From c8636fd2779102ccd6f5e09ee32e57999e32ef4b Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Sun, 25 Sep 2016 01:56:18 -0500 Subject: [PATCH 001/188] fix heartbeat (#737) --- src/client/ClientManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/ClientManager.js b/src/client/ClientManager.js index 25e732ca8..552554b7a 100644 --- a/src/client/ClientManager.js +++ b/src/client/ClientManager.js @@ -51,7 +51,7 @@ class ClientManager { this.heartbeatInterval = this.client.setInterval(() => { this.client.ws.send({ op: Constants.OPCodes.HEARTBEAT, - d: Date.now(), + d: this.client.ws.sequence, }, true); }, time); } From 0e8f1bef97b925b1d9aed1b80765f792fa12e68e Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 25 Sep 2016 11:23:47 +0100 Subject: [PATCH 002/188] Stop comparing for equality on update events and just emit for performance --- docs/docs.json | 2 +- src/client/actions/ChannelUpdate.js | 2 +- src/client/actions/GuildRoleUpdate.js | 2 +- src/client/actions/GuildUpdate.js | 2 +- src/client/actions/MessageUpdate.js | 2 +- test/random.js | 18 ++++++++++++++++-- 6 files changed, 21 insertions(+), 7 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 0066f1f18..33d362dc8 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1474743269703},"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":218,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":227,"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":247,"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":262,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":272,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":284,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `message_cache_lifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":91,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":97,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":103,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":109,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":121,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":127,"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":133,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":166,"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":175,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":184,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":193,"file":"Client.js","path":"src/client"},"props":[]}],"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:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":340,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":346,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":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":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":55,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":62,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":170,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":206,"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":216,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":258,"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":636,"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":659,"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":684,"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":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.log);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.log);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":7,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":53,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":67,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":109,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"The manager of the spawned shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":17,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"The shard ID","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":23,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"The process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":29,"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":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":58,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. THIS IS NOT NEEDED IN ANY NORMAL CASE!","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":76,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":111,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":122,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":137,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":50,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":61,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":103,"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",""]]]}},{"name":"url","description":"If you want to display as streaming, set this as the URL to the stream (must be a\ntwitch.tv URl)","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":106,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":116,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":126,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":135,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":145,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":173,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"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#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":37,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":43,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["Game",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#creationDate","name":"creationDate","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":87,"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":96,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"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":92,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#creationDate","name":"creationDate","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":58,"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":67,"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":80,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":95,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":121,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":84,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"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#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":261,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":269,"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":277,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":286,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":300,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.log);"],"meta":{"line":334,"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":348,"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":362,"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":376,"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":390,"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":404,"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":418,"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":432,"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":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":462,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":476,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":504,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"meta":{"line":519,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log)"],"meta":{"line":538,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"meta":{"line":553,"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":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":577,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":614,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":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":28,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":34,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":40,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"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":54,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":77,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":89,"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":95,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":101,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":107,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":113,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":126,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":138,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":155,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#creationDate","name":"creationDate","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":204,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":212,"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":221,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":240,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":209,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":221,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":232,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":242,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":251,"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":260,"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":269,"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":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":312,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":321,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":342,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":350,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":358,"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":371,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":382,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":94,"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":103,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":121,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":132,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":141,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":150,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":159,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":167,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":184,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":196,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":127,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":138,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":102,"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":110,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":119,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":291,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.log);"],"meta":{"line":306,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":325,"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":333,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"meta":{"line":347,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.log);"],"meta":{"line":368,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":389,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":418,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"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#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":191,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":199,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":207,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":216,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":254,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":262,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":280,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":109,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":130,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":142,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"meta":{"line":156,"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":170,"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":184,"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":198,"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":212,"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":226,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"meta":{"line":239,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":250,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":265,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#creationDate","name":"creationDate","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":98,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","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":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":106,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":116,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":126,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":135,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":145,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":173,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"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#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":37,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":43,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["Game",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#creationDate","name":"creationDate","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":87,"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":96,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.log);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.log);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#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":256,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disable_everyone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to each middle piece","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to each middle piece","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Game","name":"Game","description":"Represents data about a Game","type":{"types":[[["object",""]]]},"meta":{"line":61,"file":"User.js","path":"src/structures"},"properties":[{"name":"name","description":"the name of the game being played.","type":{"types":[[["string",""]]]}},{"name":"url","description":"the URL of the stream, if the game is being streamed.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"type","description":"if being streamed, this is `1`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"api_request_method","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shard_id","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shard_count","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max_message_cache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_cache_lifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_sweep_interval","description":"How frequently to remove messages from the cache that are older than\nthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetch_all_members","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disable_everyone","description":"Default value for MessageOptions.disable_everyone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"rest_ws_bridge_timeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1474799041938},"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":218,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":227,"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":247,"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":262,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":272,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":284,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `message_cache_lifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":91,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":97,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":103,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":109,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":121,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":127,"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":133,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":166,"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":175,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":184,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":193,"file":"Client.js","path":"src/client"},"props":[]}],"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:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":340,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":346,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":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":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":55,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":62,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":170,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":206,"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":216,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":258,"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":636,"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":659,"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":684,"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":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.log);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.log);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":7,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":53,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":67,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":109,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"The manager of the spawned shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":17,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"The shard ID","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":23,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"The process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":29,"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":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":58,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. THIS IS NOT NEEDED IN ANY NORMAL CASE!","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":76,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":111,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":122,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":137,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":50,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":61,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":103,"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",""]]]}},{"name":"url","description":"If you want to display as streaming, set this as the URL to the stream (must be a\ntwitch.tv URl)","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":106,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":116,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":126,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":135,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":145,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":173,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"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#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":37,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":43,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["Game",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#creationDate","name":"creationDate","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":87,"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":96,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"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":92,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#creationDate","name":"creationDate","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":58,"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":67,"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":80,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":95,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":121,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":84,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"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#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":261,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":269,"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":277,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":286,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":300,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.log);"],"meta":{"line":334,"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":348,"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":362,"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":376,"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":390,"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":404,"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":418,"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":432,"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":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":462,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":476,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":504,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"meta":{"line":519,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log)"],"meta":{"line":538,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"meta":{"line":553,"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":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":577,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":614,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":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":28,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":34,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":40,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"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":54,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":77,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":89,"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":95,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":101,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":107,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":113,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":126,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":138,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":155,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#creationDate","name":"creationDate","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":204,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":212,"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":221,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":240,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":209,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":221,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":232,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":242,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":251,"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":260,"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":269,"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":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":312,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":321,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":342,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":350,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":358,"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":371,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":382,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":94,"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":103,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":121,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":132,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":141,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":150,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":159,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":167,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":184,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":196,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":127,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":138,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":102,"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":110,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":119,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":291,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.log);"],"meta":{"line":306,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":325,"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":333,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"meta":{"line":347,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.log);"],"meta":{"line":368,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":389,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":418,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"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#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":191,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":199,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":207,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":216,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":254,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":262,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":280,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":109,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":130,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":142,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"meta":{"line":156,"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":170,"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":184,"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":198,"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":212,"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":226,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"meta":{"line":239,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":250,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":265,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#creationDate","name":"creationDate","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":98,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","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":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":106,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":116,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":126,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":135,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":145,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":173,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"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#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":37,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":43,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["Game",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#creationDate","name":"creationDate","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":87,"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":96,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.log);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.log);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#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":256,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disable_everyone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to each middle piece","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to each middle piece","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Game","name":"Game","description":"Represents data about a Game","type":{"types":[[["object",""]]]},"meta":{"line":61,"file":"User.js","path":"src/structures"},"properties":[{"name":"name","description":"the name of the game being played.","type":{"types":[[["string",""]]]}},{"name":"url","description":"the URL of the stream, if the game is being streamed.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"type","description":"if being streamed, this is `1`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"api_request_method","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shard_id","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shard_count","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max_message_cache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_cache_lifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_sweep_interval","description":"How frequently to remove messages from the cache that are older than\nthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetch_all_members","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disable_everyone","description":"Default value for MessageOptions.disable_everyone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"rest_ws_bridge_timeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file diff --git a/src/client/actions/ChannelUpdate.js b/src/client/actions/ChannelUpdate.js index 636addd2e..df50ed483 100644 --- a/src/client/actions/ChannelUpdate.js +++ b/src/client/actions/ChannelUpdate.js @@ -10,7 +10,7 @@ class ChannelUpdateAction extends Action { if (channel) { const oldChannel = cloneObject(channel); channel.setup(data); - if (!oldChannel.equals(data)) client.emit(Constants.Events.CHANNEL_UPDATE, oldChannel, channel); + client.emit(Constants.Events.CHANNEL_UPDATE, oldChannel, channel); return { old: oldChannel, updated: channel, diff --git a/src/client/actions/GuildRoleUpdate.js b/src/client/actions/GuildRoleUpdate.js index d52fac962..72ad1513a 100644 --- a/src/client/actions/GuildRoleUpdate.js +++ b/src/client/actions/GuildRoleUpdate.js @@ -12,7 +12,7 @@ class GuildRoleUpdateAction extends Action { let oldRole = null; const role = guild.roles.get(roleData.id); - if (role && !role.equals(roleData)) { + if (role) { oldRole = cloneObject(role); role.setup(data.role); client.emit(Constants.Events.GUILD_ROLE_UPDATE, guild, oldRole, role); diff --git a/src/client/actions/GuildUpdate.js b/src/client/actions/GuildUpdate.js index c1cdf6d6c..efda7f7df 100644 --- a/src/client/actions/GuildUpdate.js +++ b/src/client/actions/GuildUpdate.js @@ -10,7 +10,7 @@ class GuildUpdateAction extends Action { if (guild) { const oldGuild = cloneObject(guild); guild.setup(data); - if (!oldGuild.equals(data)) client.emit(Constants.Events.GUILD_UPDATE, oldGuild, guild); + client.emit(Constants.Events.GUILD_UPDATE, oldGuild, guild); return { old: oldGuild, updated: guild, diff --git a/src/client/actions/MessageUpdate.js b/src/client/actions/MessageUpdate.js index 042382af7..a62c332d6 100644 --- a/src/client/actions/MessageUpdate.js +++ b/src/client/actions/MessageUpdate.js @@ -9,7 +9,7 @@ class MessageUpdateAction extends Action { const channel = client.channels.get(data.channel_id); if (channel) { const message = channel.messages.get(data.id); - if (message && !message.equals(data, true)) { + if (message) { const oldMessage = cloneObject(message); message.patch(data); message._edits.unshift(oldMessage); diff --git a/test/random.js b/test/random.js index 8d1103744..7d0e011e0 100644 --- a/test/random.js +++ b/test/random.js @@ -22,8 +22,22 @@ client.on('guildMemberAdd', (g, m) => { console.log(`${m.user.username} joined ${g.name}`); }) -client.on('guildMemberUpdate', (g, o, n) => { - console.log(o.nickname, n.nickname); +let c = 0; + +client.on('channelUpdate', () => { + c++; console.log(c); +}); + +client.on('guildMemberUpdate', () => { + c++; console.log(c); +}); + +client.on('channelPinsUpdate', () => { + c++; console.log(c); +}); + +client.on('presenceUpdate', () => { + c++; console.log(c); }); client.on('debug', console.log); From 03651fd6e3421dac4175e93aa5cc70ea0a060aa4 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 25 Sep 2016 14:15:58 +0100 Subject: [PATCH 003/188] Change how presences are handled --- src/client/Client.js | 16 ++++ src/client/actions/GuildSync.js | 6 +- .../packets/handlers/PresenceUpdate.js | 28 ++---- .../websocket/packets/handlers/Ready.js | 6 ++ src/structures/Guild.js | 21 +++-- src/structures/GuildMember.js | 9 ++ src/structures/Presence.js | 89 +++++++++++++++++++ src/structures/User.js | 51 ++++------- test/random.js | 24 +---- test/shard.js | 7 +- test/sharder.js | 2 +- 11 files changed, 169 insertions(+), 90 deletions(-) create mode 100644 src/structures/Presence.js diff --git a/src/client/Client.js b/src/client/Client.js index 368ef6c7c..82c229655 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -9,6 +9,7 @@ const ClientVoiceManager = require('./voice/ClientVoiceManager'); const WebSocketManager = require('./websocket/WebSocketManager'); const ActionsManager = require('./actions/ActionsManager'); const Collection = require('../util/Collection'); +const Presence = require('../structures/Presence'); /** * The starting point for making a Discord Bot. @@ -102,6 +103,13 @@ class Client extends EventEmitter { */ this.channels = new Collection(); + /** + * A Collection of presences for friends of the logged in user. + * This is only present for user accounts, not bot accounts! + * @type {Collection} + */ + this.presences = new Collection(); + /** * The authorization token for the logged in user/bot. * @type {?string} @@ -333,6 +341,14 @@ class Client extends EventEmitter { clearInterval(interval); this._intervals.delete(interval); } + + _setPresence(id, presence) { + if (this.presences.get(id)) { + this.presences.get(id).update(presence); + return; + } + this.presences.set(id, new Presence(presence)); + } } module.exports = Client; diff --git a/src/client/actions/GuildSync.js b/src/client/actions/GuildSync.js index 763acf788..d9b8dab02 100644 --- a/src/client/actions/GuildSync.js +++ b/src/client/actions/GuildSync.js @@ -8,11 +8,7 @@ class GuildSync extends Action { if (guild) { data.presences = data.presences || []; for (const presence of data.presences) { - const user = client.users.get(presence.user.id); - if (user) { - user.status = presence.status; - user.game = presence.game; - } + guild._setPresence(presence.user.id, presence); } data.members = data.members || []; diff --git a/src/client/websocket/packets/handlers/PresenceUpdate.js b/src/client/websocket/packets/handlers/PresenceUpdate.js index cfd7ee3a6..159b10753 100644 --- a/src/client/websocket/packets/handlers/PresenceUpdate.js +++ b/src/client/websocket/packets/handlers/PresenceUpdate.js @@ -19,9 +19,9 @@ class PresenceUpdateHandler extends AbstractHandler { } if (guild) { - const memberInGuild = guild.members.get(user.id); - if (!memberInGuild && data.status !== 'offline') { - const member = guild._addMember({ + let member = guild.members.get(user.id); + if (!member && data.status !== 'offline') { + member = guild._addMember({ user, roles: data.roles, deaf: false, @@ -29,26 +29,12 @@ class PresenceUpdateHandler extends AbstractHandler { }, false); client.emit(Constants.Events.GUILD_MEMBER_AVAILABLE, guild, member); } + guild._setPresence(user.id, data); } - 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.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); - - if (!same) { - const oldUser = cloneObject(user); - user.patch(data.user); - client.emit(Constants.Events.PRESENCE_UPDATE, oldUser, user); - } + const oldUser = cloneObject(user); + user.patch(data.user); + client.emit(Constants.Events.PRESENCE_UPDATE, oldUser, user); } } diff --git a/src/client/websocket/packets/handlers/Ready.js b/src/client/websocket/packets/handlers/Ready.js index 32ffcb57f..7236148d3 100644 --- a/src/client/websocket/packets/handlers/Ready.js +++ b/src/client/websocket/packets/handlers/Ready.js @@ -16,6 +16,12 @@ class ReadyHandler extends AbstractHandler { for (const guild of data.guilds) client.dataManager.newGuild(guild); for (const privateDM of data.private_channels) client.dataManager.newChannel(privateDM); + data.presences = data.presences || []; + for (const presence of data.presences) { + client.dataManager.newUser(presence.user); + client._setPresence(presence.user.id, presence); + } + if (!client.user.bot) client.setInterval(client.syncGuilds.bind(client), 30000); client.once('ready', client.syncGuilds.bind(client)); diff --git a/src/structures/Guild.js b/src/structures/Guild.js index a14b554b6..fdd06de96 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -1,6 +1,7 @@ const User = require('./User'); const Role = require('./Role'); const Emoji = require('./Emoji'); +const Presence = require('./Presence'); const GuildMember = require('./GuildMember'); const Constants = require('../util/Constants'); const Collection = require('../util/Collection'); @@ -58,6 +59,14 @@ class Guild { } } + _setPresence(id, presence) { + if (this.presences.get(id)) { + this.presences.get(id).update(presence); + return; + } + this.presences.set(id, new Presence(presence)); + } + /** * Sets up the Guild * @param {*} data The raw data of the guild @@ -100,6 +109,12 @@ class Guild { */ this.large = data.large || this.large; + /** + * A collection of presences in this Guild + * @type {Collection} + */ + this.presences = new Collection(); + /** * An array of guild features. * @type {Object[]} @@ -170,11 +185,7 @@ class Guild { if (data.presences) { for (const presence of data.presences) { - const user = this.client.users.get(presence.user.id); - if (user) { - user.status = presence.status; - user.game = presence.game; - } + this._setPresence(presence.user.id, presence); } } diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index 55cdcc81e..bd5be285c 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -87,6 +87,15 @@ class GuildMember { this._joinDate = new Date(data.joined_at).getTime(); } + /** + * The presence of this Guild Member + * @type {Presence} + * @readonly + */ + get presence() { + return this.guild.presences.get(this.id); + } + /** * The date this member joined the guild * @type {Date} diff --git a/src/structures/Presence.js b/src/structures/Presence.js new file mode 100644 index 000000000..71dfc460e --- /dev/null +++ b/src/structures/Presence.js @@ -0,0 +1,89 @@ +/** + * Represents a Game that is part of a User's presence. + */ +class Game { + constructor(data) { + /** + * The name of the game being played + * @type {string} + */ + this.name = data.name; + /** + * The type of the game status + * @type {number} + */ + this.type = data.type; + /** + * If the game is being streamed, a link to the stream + * @type {string} + */ + this.url = data.url; + } + + /** + * Whether or not the game is being streamed + * @readonly + */ + get streaming() { + return this.type === 1; + } + + /** + * Whether this game is equal to another game + * @param {Game} other the other game to compare + * @returns {boolean} + */ + equals(other) { + return ( + this.name === other.name && + this.type === other.type && + this.url === other.url + ); + } +} + +class Presence { + constructor(data) { + /** + * The status of the presence: + * + * * **`online`** - user is online + * * **`offline`** - user is offline + * * **`idle`** - user is AFK + * @type {string} + */ + this.status = data.status || 'offline'; + if (data.game) { + /** + * The game that the user is playing, `null` if they aren't playing a game. + * @type {Game} + */ + this.game = new Game(data.game); + } else { + this.game = null; + } + } + + /** + * Whether this presence is equal to another + * @param {Presence} other the presence to compare + * @returns {boolean} + */ + equals(other) { + return ( + this.status === other.status && + this.game ? this.game.equals(other.game) : !other.game + ); + } + + update(data) { + this.status = data.status || this.status; + if (data.game) { + this.game = new Game(data.game); + } else { + this.game = null; + } + } +} + +module.exports = Presence; diff --git a/src/structures/User.js b/src/structures/User.js index 0f43d4ced..d54abc4fc 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -1,5 +1,6 @@ const TextBasedChannel = require('./interface/TextBasedChannel'); const Constants = require('../util/Constants'); +const Presence = require('./Presence'); /** * Represents a User on Discord. @@ -47,34 +48,26 @@ class User { * @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'; - - /** - * Represents data about a Game - * @property {string} name the name of the game being played. - * @property {string} [url] the URL of the stream, if the game is being streamed. - * @property {number} [type] if being streamed, this is `1`. - * @typedef {object} Game - */ - - /** - * The game that the user is playing, `null` if they aren't playing a game. - * @type {Game} - */ - this.game = data.game; + /** + * The presence of this user + * @readonly + */ + get presence() { + if (this.client.presences.has(this.id)) { + return this.client.presences.get(this.id); + } + for (const guild of this.client.guilds.values()) { + if (guild.presences.has(this.id)) { + return guild.presences.get(this.id); + } + } + return new Presence(); } patch(data) { - for (const prop of ['id', 'username', 'discriminator', 'status', 'game', 'avatar', 'bot']) { + for (const prop of ['id', 'username', 'discriminator', 'avatar', 'bot']) { if (typeof data[prop] !== 'undefined') this[prop] = data[prop]; } } @@ -150,16 +143,6 @@ class User { this.avatar === user.avatar && this.bot === Boolean(user.bot); - if (equal) { - if (user.status) equal = this.status === user.status; - if (equal && user.game) { - equal = this.game && - this.game.name === user.game.name && - this.game.type === user.game.type && - this.game.url === user.game.url; - } - } - return equal; } diff --git a/test/random.js b/test/random.js index 7d0e011e0..1ac0db765 100644 --- a/test/random.js +++ b/test/random.js @@ -6,7 +6,7 @@ const fs = require('fs'); const client = new Discord.Client({ fetch_all_members: false, api_request_method: 'sequential' }); -const { email, password, token } = require('./auth.json'); +const { email, password, token, usertoken } = require('./auth.json'); client.login(token).then(atoken => console.log('logged in with token ' + atoken)).catch(console.log); @@ -18,28 +18,6 @@ client.on('channelCreate', channel => { console.log(`made ${channel.name}`); }); -client.on('guildMemberAdd', (g, m) => { - console.log(`${m.user.username} joined ${g.name}`); -}) - -let c = 0; - -client.on('channelUpdate', () => { - c++; console.log(c); -}); - -client.on('guildMemberUpdate', () => { - c++; console.log(c); -}); - -client.on('channelPinsUpdate', () => { - c++; console.log(c); -}); - -client.on('presenceUpdate', () => { - c++; console.log(c); -}); - client.on('debug', console.log); client.on('message', message => { diff --git a/test/shard.js b/test/shard.js index 8ae8633ba..ca05fe773 100644 --- a/test/shard.js +++ b/test/shard.js @@ -20,7 +20,12 @@ client.on('message', msg => { process.send(123); client.on('ready', () => { - console.log('Ready'); + console.log('Ready', client.options.shard_id); + if (client.options.shard_id === '0') + setTimeout(() => { + console.log('kek dying'); + client.destroy(); + }, 5000); }); client.login(token).catch(console.log); diff --git a/test/sharder.js b/test/sharder.js index 5a1340620..205c550a8 100644 --- a/test/sharder.js +++ b/test/sharder.js @@ -1,6 +1,6 @@ const Discord = require('../'); -const sharder = new Discord.ShardingManager(`${process.cwd()}/test/shard.js`); +const sharder = new Discord.ShardingManager(`${process.cwd()}/test/shard.js`, 5, false); sharder.on('launch', id => console.log(`launched ${id}`)); From 761b8cfb8d21abeaf287e822b2f24c7155f4144d Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 25 Sep 2016 14:28:46 +0100 Subject: [PATCH 004/188] fix docs --- docs/docs.json | 2 +- src/structures/Presence.js | 4 ++++ src/structures/User.js | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 33d362dc8..b2df01fa7 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1474799041938},"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":218,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":227,"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":247,"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":262,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":272,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":284,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `message_cache_lifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":91,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":97,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":103,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":109,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":121,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":127,"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":133,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":166,"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":175,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":184,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":193,"file":"Client.js","path":"src/client"},"props":[]}],"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:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":340,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":346,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":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":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":55,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":62,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":170,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":206,"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":216,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":258,"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":636,"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":659,"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":684,"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":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.log);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.log);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":7,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":53,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":67,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":109,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"The manager of the spawned shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":17,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"The shard ID","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":23,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"The process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":29,"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":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":58,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. THIS IS NOT NEEDED IN ANY NORMAL CASE!","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":76,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":111,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":122,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":137,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":50,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":61,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":103,"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",""]]]}},{"name":"url","description":"If you want to display as streaming, set this as the URL to the stream (must be a\ntwitch.tv URl)","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":106,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":116,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":126,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":135,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":145,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":173,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"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#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":37,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":43,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["Game",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#creationDate","name":"creationDate","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":87,"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":96,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"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":92,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#creationDate","name":"creationDate","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":58,"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":67,"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":80,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":95,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":121,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":84,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"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#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":261,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":269,"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":277,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":286,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":300,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.log);"],"meta":{"line":334,"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":348,"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":362,"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":376,"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":390,"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":404,"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":418,"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":432,"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":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":462,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":476,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":504,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"meta":{"line":519,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log)"],"meta":{"line":538,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"meta":{"line":553,"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":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":577,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":614,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":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":28,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":34,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":40,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"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":54,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":77,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":89,"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":95,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":101,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":107,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":113,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":126,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":138,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":155,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#creationDate","name":"creationDate","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":204,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":212,"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":221,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":240,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":209,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":221,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":232,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":242,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":251,"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":260,"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":269,"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":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":312,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":321,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":342,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":350,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":358,"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":371,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":382,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":94,"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":103,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":121,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":132,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":141,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":150,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":159,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":167,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":184,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":196,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":127,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":138,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":102,"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":110,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":119,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":291,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.log);"],"meta":{"line":306,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":325,"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":333,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"meta":{"line":347,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.log);"],"meta":{"line":368,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":389,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":418,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"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#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":191,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":199,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":207,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":216,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":254,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":262,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":280,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":109,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":130,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":142,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"meta":{"line":156,"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":170,"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":184,"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":198,"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":212,"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":226,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"meta":{"line":239,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":250,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":265,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#creationDate","name":"creationDate","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":98,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","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":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":106,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":116,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":126,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":135,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":145,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":173,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"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#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":37,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":43,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["Game",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#creationDate","name":"creationDate","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":87,"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":96,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.log);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.log);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#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":256,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disable_everyone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to each middle piece","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to each middle piece","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Game","name":"Game","description":"Represents data about a Game","type":{"types":[[["object",""]]]},"meta":{"line":61,"file":"User.js","path":"src/structures"},"properties":[{"name":"name","description":"the name of the game being played.","type":{"types":[[["string",""]]]}},{"name":"url","description":"the URL of the stream, if the game is being streamed.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"type","description":"if being streamed, this is `1`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"api_request_method","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shard_id","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shard_count","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max_message_cache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_cache_lifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_sweep_interval","description":"How frequently to remove messages from the cache that are older than\nthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetch_all_members","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disable_everyone","description":"Default value for MessageOptions.disable_everyone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"rest_ws_bridge_timeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1474810131564},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":18,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":235,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":255,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":270,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":280,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":292,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `message_cache_lifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":29,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":92,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":104,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":117,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":123,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":129,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":135,"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":141,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":174,"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":183,"file":"Client.js","path":"src/client"},"props":[]},{"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#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"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":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:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":356,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":362,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":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":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":170,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":206,"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":216,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":258,"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":647,"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":670,"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":695,"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":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.log);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.log);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":7,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":53,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":67,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":109,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"The manager of the spawned shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":17,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"The shard ID","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":23,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"The process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":29,"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":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":58,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. THIS IS NOT NEEDED IN ANY NORMAL CASE!","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":76,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":111,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":122,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":137,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":50,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":61,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":103,"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",""]]]}},{"name":"url","description":"If you want to display as streaming, set this as the URL to the stream (must be a\ntwitch.tv URl)","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#creationDate","name":"creationDate","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"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":92,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#creationDate","name":"creationDate","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":58,"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":67,"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":80,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":95,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":121,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":84,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":272,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":280,"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":288,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":297,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":311,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.log);"],"meta":{"line":345,"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":359,"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":373,"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":387,"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":401,"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":415,"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":429,"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":443,"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":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":507,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log)"],"meta":{"line":549,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"meta":{"line":564,"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":577,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":588,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":625,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":80,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":104,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":110,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":116,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":122,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":128,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":135,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":141,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":147,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":153,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":170,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#creationDate","name":"creationDate","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"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":223,"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":232,"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":242,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":251,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":260,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":230,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":241,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":260,"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":269,"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":278,"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":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":321,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":330,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":351,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":359,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":367,"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":380,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":391,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":95,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":103,"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":112,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":130,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":141,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":150,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":159,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":168,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":205,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":127,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":138,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":102,"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":110,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":119,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":291,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.log);"],"meta":{"line":306,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":325,"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":333,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"meta":{"line":347,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.log);"],"meta":{"line":368,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":389,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":418,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"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#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":191,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":199,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":207,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":216,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":254,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":262,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":280,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":37,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":10,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":28,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":49,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":76,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":109,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":130,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":142,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"meta":{"line":156,"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":170,"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":184,"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":198,"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":212,"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":226,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"meta":{"line":239,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":250,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":265,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#creationDate","name":"creationDate","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":98,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","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":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#creationDate","name":"creationDate","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.log);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.log);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#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":256,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disable_everyone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to each middle piece","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to each middle piece","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"api_request_method","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shard_id","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shard_count","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max_message_cache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_cache_lifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_sweep_interval","description":"How frequently to remove messages from the cache that are older than\nthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetch_all_members","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disable_everyone","description":"Default value for MessageOptions.disable_everyone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"rest_ws_bridge_timeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file diff --git a/src/structures/Presence.js b/src/structures/Presence.js index 71dfc460e..63d1f7418 100644 --- a/src/structures/Presence.js +++ b/src/structures/Presence.js @@ -22,6 +22,7 @@ class Game { /** * Whether or not the game is being streamed + * @type {boolean} * @readonly */ get streaming() { @@ -42,6 +43,9 @@ class Game { } } +/** + * Represents a User's presence + */ class Presence { constructor(data) { /** diff --git a/src/structures/User.js b/src/structures/User.js index d54abc4fc..07147a8a9 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -53,6 +53,7 @@ class User { /** * The presence of this user * @readonly + * @type {Presence} */ get presence() { if (this.client.presences.has(this.id)) { From 534d7af8c36e3631fb8916a4cac7e5d443b0fd38 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 25 Sep 2016 15:03:48 +0100 Subject: [PATCH 005/188] Fix resuming sessions (fixes #699) --- docs/docs.json | 2 +- src/client/websocket/WebSocketManager.js | 25 ++++++++++++++++--- .../packets/WebSocketPacketManager.js | 3 ++- test/random.js | 4 ++- 4 files changed, 28 insertions(+), 6 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index b2df01fa7..1c188f5eb 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1474810131564},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":18,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":235,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":255,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":270,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":280,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":292,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `message_cache_lifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":29,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":92,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":104,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":117,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":123,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":129,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":135,"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":141,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":174,"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":183,"file":"Client.js","path":"src/client"},"props":[]},{"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#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"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":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:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":356,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":362,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":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":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":170,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":206,"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":216,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":258,"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":647,"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":670,"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":695,"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":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.log);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.log);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":7,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":53,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":67,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":109,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"The manager of the spawned shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":17,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"The shard ID","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":23,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"The process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":29,"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":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":58,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. THIS IS NOT NEEDED IN ANY NORMAL CASE!","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":76,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":111,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":122,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":137,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":50,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":61,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":103,"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",""]]]}},{"name":"url","description":"If you want to display as streaming, set this as the URL to the stream (must be a\ntwitch.tv URl)","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#creationDate","name":"creationDate","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"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":92,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#creationDate","name":"creationDate","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":58,"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":67,"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":80,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":95,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":121,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":84,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":272,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":280,"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":288,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":297,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":311,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.log);"],"meta":{"line":345,"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":359,"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":373,"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":387,"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":401,"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":415,"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":429,"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":443,"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":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":507,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log)"],"meta":{"line":549,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"meta":{"line":564,"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":577,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":588,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":625,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":80,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":104,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":110,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":116,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":122,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":128,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":135,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":141,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":147,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":153,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":170,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#creationDate","name":"creationDate","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"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":223,"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":232,"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":242,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":251,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":260,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":230,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":241,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":260,"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":269,"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":278,"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":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":321,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":330,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":351,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":359,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":367,"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":380,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":391,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":95,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":103,"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":112,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":130,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":141,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":150,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":159,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":168,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":205,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":127,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":138,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":102,"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":110,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":119,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":291,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.log);"],"meta":{"line":306,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":325,"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":333,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"meta":{"line":347,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.log);"],"meta":{"line":368,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":389,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":418,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"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#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":191,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":199,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":207,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":216,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":254,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":262,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":280,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":37,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":10,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":28,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":49,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":76,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":109,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":130,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":142,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"meta":{"line":156,"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":170,"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":184,"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":198,"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":212,"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":226,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"meta":{"line":239,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":250,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":265,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#creationDate","name":"creationDate","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":98,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","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":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#creationDate","name":"creationDate","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.log);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.log);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#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":256,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disable_everyone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to each middle piece","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to each middle piece","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"api_request_method","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shard_id","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shard_count","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max_message_cache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_cache_lifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_sweep_interval","description":"How frequently to remove messages from the cache that are older than\nthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetch_all_members","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disable_everyone","description":"Default value for MessageOptions.disable_everyone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"rest_ws_bridge_timeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1474812233928},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":18,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":235,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":255,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":270,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":280,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":292,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `message_cache_lifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":29,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":92,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":104,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":117,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":123,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":129,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":135,"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":141,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":174,"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":183,"file":"Client.js","path":"src/client"},"props":[]},{"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#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"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":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:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":356,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":362,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":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":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":189,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":225,"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":235,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":277,"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":647,"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":670,"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":695,"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":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.log);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.log);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":7,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":53,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":67,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":109,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"The manager of the spawned shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":17,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"The shard ID","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":23,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"The process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":29,"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":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":58,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. THIS IS NOT NEEDED IN ANY NORMAL CASE!","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":76,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":111,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":122,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":137,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":50,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":61,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":103,"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",""]]]}},{"name":"url","description":"If you want to display as streaming, set this as the URL to the stream (must be a\ntwitch.tv URl)","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#creationDate","name":"creationDate","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"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":92,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#creationDate","name":"creationDate","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":58,"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":67,"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":80,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":95,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":121,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":84,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":272,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":280,"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":288,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":297,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":311,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.log);"],"meta":{"line":345,"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":359,"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":373,"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":387,"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":401,"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":415,"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":429,"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":443,"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":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":507,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log)"],"meta":{"line":549,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"meta":{"line":564,"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":577,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":588,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":625,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":80,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":104,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":110,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":116,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":122,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":128,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":135,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":141,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":147,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":153,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":170,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#creationDate","name":"creationDate","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"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":223,"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":232,"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":242,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":251,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":260,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":230,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":241,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":260,"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":269,"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":278,"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":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":321,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":330,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":351,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":359,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":367,"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":380,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":391,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":95,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":103,"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":112,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":130,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":141,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":150,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":159,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":168,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":205,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":127,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":138,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":102,"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":110,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":119,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":291,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.log);"],"meta":{"line":306,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":325,"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":333,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"meta":{"line":347,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.log);"],"meta":{"line":368,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":389,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":418,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"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#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":191,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":199,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":207,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":216,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":254,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":262,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":280,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":37,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":10,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":28,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":49,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":76,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":109,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":130,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":142,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"meta":{"line":156,"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":170,"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":184,"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":198,"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":212,"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":226,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"meta":{"line":239,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":250,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":265,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#creationDate","name":"creationDate","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":98,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","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":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#creationDate","name":"creationDate","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.log);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.log);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#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":256,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disable_everyone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to each middle piece","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to each middle piece","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"api_request_method","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shard_id","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shard_count","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max_message_cache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_cache_lifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_sweep_interval","description":"How frequently to remove messages from the cache that are older than\nthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetch_all_members","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disable_everyone","description":"Default value for MessageOptions.disable_everyone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"rest_ws_bridge_timeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index ba5cbef49..aa3b08b7d 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -58,16 +58,20 @@ class WebSocketManager extends EventEmitter { * @type {?WebSocket} */ this.ws = null; + + this.first = true; } /** * Connects the client to a given gateway * @param {string} gateway The gateway to connect to */ - connect(gateway) { + _connect(gateway) { this.client.emit('debug', `Connecting to gateway ${gateway}`); this.normalReady = false; - this.status = Constants.Status.CONNECTING; + if (this.status !== Constants.Status.RECONNECTING) { + this.status = Constants.Status.CONNECTING; + } this.ws = new WebSocket(gateway); this.ws.onopen = () => this.eventOpen(); this.ws.onclose = (d) => this.eventClose(d); @@ -77,6 +81,15 @@ class WebSocketManager extends EventEmitter { this._remaining = 3; } + connect(gateway) { + if (this.first) { + this._connect(gateway); + this.first = false; + } else { + this.client.setTimeout(() => this._connect(gateway), 5500); + } + } + /** * Sends a packet to the gateway * @param {Object} data An object that can be JSON stringified @@ -125,7 +138,7 @@ class WebSocketManager extends EventEmitter { */ eventOpen() { this.client.emit('debug', 'Connection to gateway opened'); - if (this.reconnecting) this._sendResume(); + if (this.status === Constants.Status.RECONNECTING) this._sendResume(); else this._sendNewIdentify(); } @@ -133,6 +146,11 @@ class WebSocketManager extends EventEmitter { * Sends a gateway resume packet, in cases of unexpected disconnections. */ _sendResume() { + if (!this.sessionID) { + this._sendNewIdentify(); + return; + } + this.client.emit('debug', 'identifying as resumed session'); const payload = { token: this.client.token, session_id: this.sessionID, @@ -155,6 +173,7 @@ class WebSocketManager extends EventEmitter { if (this.client.options.shard_count > 0) { payload.shard = [Number(this.client.options.shard_id), Number(this.client.options.shard_count)]; } + this.client.emit('debug', 'identifying as new session'); this.send({ op: Constants.OPCodes.IDENTIFY, d: payload, diff --git a/src/client/websocket/packets/WebSocketPacketManager.js b/src/client/websocket/packets/WebSocketPacketManager.js index bf81fd538..25e17861b 100644 --- a/src/client/websocket/packets/WebSocketPacketManager.js +++ b/src/client/websocket/packets/WebSocketPacketManager.js @@ -72,11 +72,12 @@ class WebSocketPacketManager { } if (packet.op === Constants.OPCodes.INVALID_SESSION) { + this.ws.sessionID = null; this.ws._sendNewIdentify(); return false; } - if (this.ws.reconnecting) { + if (this.ws.status === Constants.Status.RECONNECTING) { this.ws.reconnecting = false; this.ws.checkIfReady(); } diff --git a/test/random.js b/test/random.js index 1ac0db765..724573e29 100644 --- a/test/random.js +++ b/test/random.js @@ -18,7 +18,9 @@ client.on('channelCreate', channel => { console.log(`made ${channel.name}`); }); -client.on('debug', console.log); +client.on('debug', m => console.log('debug', m)); +client.on('error', m => console.log('debug', m)); +client.on('reconnecting', m => console.log('debug', m)); client.on('message', message => { if (true) { From f1cb39a319483e20aeaa201aceb202e90cf5198c Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 25 Sep 2016 20:17:26 +0100 Subject: [PATCH 006/188] Expose Presence and Game structures --- docs/docs.json | 2 +- src/client/Client.js | 2 +- src/index.js | 2 ++ src/structures/Guild.js | 2 +- src/structures/Presence.js | 3 ++- src/structures/User.js | 2 +- 6 files changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 1c188f5eb..b708eea50 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1474812233928},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":18,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":235,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":255,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":270,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":280,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":292,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `message_cache_lifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":29,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":92,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":104,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":117,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":123,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":129,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":135,"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":141,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":174,"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":183,"file":"Client.js","path":"src/client"},"props":[]},{"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#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"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":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:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":356,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":362,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":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":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":189,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":225,"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":235,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":277,"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":647,"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":670,"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":695,"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":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.log);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.log);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":7,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":53,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":67,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":109,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"The manager of the spawned shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":17,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"The shard ID","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":23,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"The process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":29,"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":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":58,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. THIS IS NOT NEEDED IN ANY NORMAL CASE!","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":76,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":111,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":122,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":137,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":50,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":61,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":103,"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",""]]]}},{"name":"url","description":"If you want to display as streaming, set this as the URL to the stream (must be a\ntwitch.tv URl)","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#creationDate","name":"creationDate","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"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":92,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#creationDate","name":"creationDate","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":58,"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":67,"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":80,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":95,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":121,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":84,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":272,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":280,"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":288,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":297,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":311,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.log);"],"meta":{"line":345,"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":359,"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":373,"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":387,"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":401,"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":415,"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":429,"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":443,"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":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":507,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log)"],"meta":{"line":549,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"meta":{"line":564,"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":577,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":588,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":625,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":80,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":104,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":110,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":116,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":122,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":128,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":135,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":141,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":147,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":153,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":170,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#creationDate","name":"creationDate","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"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":223,"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":232,"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":242,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":251,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":260,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":230,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":241,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":260,"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":269,"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":278,"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":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":321,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":330,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":351,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":359,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":367,"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":380,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":391,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":95,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":103,"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":112,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":130,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":141,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":150,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":159,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":168,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":205,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":127,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":138,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":102,"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":110,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":119,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":291,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.log);"],"meta":{"line":306,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":325,"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":333,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"meta":{"line":347,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.log);"],"meta":{"line":368,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":389,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":418,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"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#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":191,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":199,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":207,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":216,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":254,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":262,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":280,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":37,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":10,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":28,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":49,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":76,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":109,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":130,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":142,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"meta":{"line":156,"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":170,"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":184,"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":198,"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":212,"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":226,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"meta":{"line":239,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":250,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":265,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#creationDate","name":"creationDate","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":98,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","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":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#creationDate","name":"creationDate","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.log);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.log);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#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":256,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disable_everyone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to each middle piece","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to each middle piece","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"api_request_method","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shard_id","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shard_count","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max_message_cache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_cache_lifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_sweep_interval","description":"How frequently to remove messages from the cache that are older than\nthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetch_all_members","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disable_everyone","description":"Default value for MessageOptions.disable_everyone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"rest_ws_bridge_timeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1474831055147},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":18,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":235,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":255,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":270,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":280,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":292,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `message_cache_lifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":29,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":92,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":104,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":117,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":123,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":129,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":135,"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":141,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":174,"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":183,"file":"Client.js","path":"src/client"},"props":[]},{"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#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"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":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:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":356,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":362,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":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":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":189,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":225,"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":235,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":277,"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":647,"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":670,"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":695,"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":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.log);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.log);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":7,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":53,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":67,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":109,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"The manager of the spawned shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":17,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"The shard ID","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":23,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"The process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":29,"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":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":58,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. THIS IS NOT NEEDED IN ANY NORMAL CASE!","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":76,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":111,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":122,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":137,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":50,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":61,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":103,"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",""]]]}},{"name":"url","description":"If you want to display as streaming, set this as the URL to the stream (must be a\ntwitch.tv URl)","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#creationDate","name":"creationDate","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"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":92,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#creationDate","name":"creationDate","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":58,"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":67,"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":80,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":95,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":121,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":84,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":272,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":280,"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":288,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":297,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":311,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.log);"],"meta":{"line":345,"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":359,"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":373,"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":387,"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":401,"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":415,"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":429,"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":443,"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":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":507,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log)"],"meta":{"line":549,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"meta":{"line":564,"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":577,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":588,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":625,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":80,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":104,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":110,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":116,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":122,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":128,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":135,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":141,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":147,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":153,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":170,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#creationDate","name":"creationDate","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"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":223,"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":232,"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":242,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":251,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":260,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":230,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":241,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":260,"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":269,"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":278,"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":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":321,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":330,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":351,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":359,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":367,"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":380,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":391,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":95,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":103,"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":112,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":130,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":141,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":150,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":159,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":168,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":205,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":127,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":138,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":102,"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":110,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":119,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":291,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.log);"],"meta":{"line":306,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":325,"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":333,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"meta":{"line":347,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.log);"],"meta":{"line":368,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":389,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":418,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"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#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":191,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":199,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":207,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":216,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":254,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":262,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":280,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":37,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":10,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":28,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":49,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":76,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":109,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":130,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":142,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"meta":{"line":156,"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":170,"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":184,"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":198,"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":212,"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":226,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"meta":{"line":239,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":250,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":265,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#creationDate","name":"creationDate","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":98,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","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":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#creationDate","name":"creationDate","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.log);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.log);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#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":256,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disable_everyone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to each middle piece","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to each middle piece","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"api_request_method","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shard_id","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shard_count","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max_message_cache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_cache_lifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_sweep_interval","description":"How frequently to remove messages from the cache that are older than\nthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetch_all_members","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disable_everyone","description":"Default value for MessageOptions.disable_everyone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"rest_ws_bridge_timeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file diff --git a/src/client/Client.js b/src/client/Client.js index 82c229655..23ea9d2dd 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -9,7 +9,7 @@ const ClientVoiceManager = require('./voice/ClientVoiceManager'); const WebSocketManager = require('./websocket/WebSocketManager'); const ActionsManager = require('./actions/ActionsManager'); const Collection = require('../util/Collection'); -const Presence = require('../structures/Presence'); +const Presence = require('../structures/Presence').Presence; /** * The starting point for making a Discord Bot. diff --git a/src/index.js b/src/index.js index abce81b74..0584bed2e 100644 --- a/src/index.js +++ b/src/index.js @@ -27,6 +27,8 @@ module.exports = { TextChannel: require('./structures/TextChannel'), User: require('./structures/User'), VoiceChannel: require('./structures/VoiceChannel'), + Presence: require('./structures/Presence').Presence, + Game: require('./structures/Presence').Game, version: require(path.join(__dirname, '..', 'package')).version, }; diff --git a/src/structures/Guild.js b/src/structures/Guild.js index fdd06de96..d9740b2cd 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -1,7 +1,7 @@ const User = require('./User'); const Role = require('./Role'); const Emoji = require('./Emoji'); -const Presence = require('./Presence'); +const Presence = require('./Presence').Presence; const GuildMember = require('./GuildMember'); const Constants = require('../util/Constants'); const Collection = require('../util/Collection'); diff --git a/src/structures/Presence.js b/src/structures/Presence.js index 63d1f7418..12060b7dc 100644 --- a/src/structures/Presence.js +++ b/src/structures/Presence.js @@ -90,4 +90,5 @@ class Presence { } } -module.exports = Presence; +exports.Presence = Presence; +exports.Game = Game; diff --git a/src/structures/User.js b/src/structures/User.js index 07147a8a9..78a27cd54 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -1,6 +1,6 @@ const TextBasedChannel = require('./interface/TextBasedChannel'); const Constants = require('../util/Constants'); -const Presence = require('./Presence'); +const Presence = require('./Presence').Presence; /** * Represents a User on Discord. From b4f3575335e7a8a21ade4eb8787ff058391aa3e5 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Mon, 26 Sep 2016 05:55:54 -0500 Subject: [PATCH 007/188] i am facepalming so hard right now (#740) --- src/client/Client.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/Client.js b/src/client/Client.js index 23ea9d2dd..861fcb465 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -29,11 +29,11 @@ class Client extends EventEmitter { this.options = mergeDefault(Constants.DefaultOptions, options); if (!this.options.shard_id && 'SHARD_ID' in process.env) { - this.options.shard_id = process.env.SHARD_ID; + this.options.shard_id = Number(process.env.SHARD_ID); } if (!this.options.shard_count && 'SHARD_COUNT' in process.env) { - this.options.shard_count = process.env.SHARD_COUNT; + this.options.shard_count = Number(process.env.SHARD_COUNT); } /** From c8761d72deba414bce2372b579ff94a466ee2507 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Mon, 26 Sep 2016 15:39:07 -0500 Subject: [PATCH 008/188] add guild emoji methods (#742) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add guild emoji methods * run docs * crawl pointed out some things about the docs, so i fixed * actually run the docs on the changes 🤦 --- docs/docs.json | 2 +- src/client/rest/RESTMethods.js | 17 ++++++++++++++++ src/structures/Guild.js | 37 ++++++++++++++++++++++++++++++++++ src/util/Constants.js | 1 + 4 files changed, 56 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index b708eea50..205ab14cf 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1474831055147},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":18,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":235,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":255,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":270,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":280,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":292,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `message_cache_lifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":29,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":92,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":104,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":117,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":123,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":129,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":135,"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":141,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":174,"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":183,"file":"Client.js","path":"src/client"},"props":[]},{"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#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"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":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:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":356,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":362,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":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":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":189,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":225,"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":235,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":277,"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":647,"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":670,"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":695,"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":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.log);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.log);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":7,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":53,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":67,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":109,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"The manager of the spawned shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":17,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"The shard ID","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":23,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"The process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":29,"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":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":58,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. THIS IS NOT NEEDED IN ANY NORMAL CASE!","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":76,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":111,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":122,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":137,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":50,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":61,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":103,"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",""]]]}},{"name":"url","description":"If you want to display as streaming, set this as the URL to the stream (must be a\ntwitch.tv URl)","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#creationDate","name":"creationDate","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"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":92,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#creationDate","name":"creationDate","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":58,"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":67,"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":80,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":95,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":121,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":84,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":272,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":280,"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":288,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":297,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":311,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.log);"],"meta":{"line":345,"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":359,"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":373,"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":387,"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":401,"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":415,"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":429,"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":443,"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":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":507,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log)"],"meta":{"line":549,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"meta":{"line":564,"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":577,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":588,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":625,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":80,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":104,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":110,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":116,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":122,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":128,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":135,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":141,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":147,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":153,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":170,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#creationDate","name":"creationDate","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"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":223,"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":232,"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":242,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":251,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":260,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":230,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":241,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":260,"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":269,"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":278,"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":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":321,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":330,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":351,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":359,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":367,"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":380,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":391,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":95,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":103,"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":112,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":130,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":141,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":150,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":159,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":168,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":205,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":127,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":138,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":102,"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":110,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":119,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":291,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.log);"],"meta":{"line":306,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":325,"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":333,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"meta":{"line":347,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.log);"],"meta":{"line":368,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":389,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":418,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"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#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":191,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":199,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":207,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":216,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":254,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":262,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":280,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":37,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":10,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":28,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":49,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":76,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":109,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":130,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":142,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"meta":{"line":156,"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":170,"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":184,"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":198,"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":212,"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":226,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"meta":{"line":239,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":250,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":265,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#creationDate","name":"creationDate","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":98,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","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":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#creationDate","name":"creationDate","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.log);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.log);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#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":256,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disable_everyone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to each middle piece","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to each middle piece","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"api_request_method","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shard_id","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shard_count","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max_message_cache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_cache_lifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_sweep_interval","description":"How frequently to remove messages from the cache that are older than\nthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetch_all_members","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disable_everyone","description":"Default value for MessageOptions.disable_everyone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"rest_ws_bridge_timeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1474914314244},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":18,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":235,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":255,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":270,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":280,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":292,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `message_cache_lifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":29,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":92,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":104,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":117,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":123,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":129,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":135,"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":141,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":174,"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":183,"file":"Client.js","path":"src/client"},"props":[]},{"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#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"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":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:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":356,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":362,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":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":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":189,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":225,"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":235,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":277,"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":684,"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":707,"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":732,"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":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.log);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.log);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":7,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":53,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":67,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":109,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"The manager of the spawned shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":17,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"The shard ID","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":23,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"The process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":29,"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":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":58,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. THIS IS NOT NEEDED IN ANY NORMAL CASE!","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":76,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":111,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":122,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":137,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":50,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":61,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":103,"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",""]]]}},{"name":"url","description":"If you want to display as streaming, set this as the URL to the stream (must be a\ntwitch.tv URl)","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#creationDate","name":"creationDate","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"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":92,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#creationDate","name":"creationDate","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":58,"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":67,"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":80,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":95,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":121,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":84,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":272,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":280,"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":288,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":297,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":311,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.log);"],"meta":{"line":345,"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":359,"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":373,"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":387,"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":401,"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":415,"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":429,"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":443,"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":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":507,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log)"],"meta":{"line":549,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.log);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.log);"],"meta":{"line":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":587,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"meta":{"line":601,"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":614,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":625,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":662,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":80,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":104,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":110,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":116,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":122,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":128,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":135,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":141,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":147,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":153,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":170,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#creationDate","name":"creationDate","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"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":223,"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":232,"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":242,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":251,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":260,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":230,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":241,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":260,"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":269,"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":278,"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":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":321,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":330,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":351,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":359,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":367,"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":380,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":391,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":95,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":103,"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":112,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":130,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":141,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":150,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":159,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":168,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":205,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":127,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":138,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":102,"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":110,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":119,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":291,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.log);"],"meta":{"line":306,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":325,"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":333,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"meta":{"line":347,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.log);"],"meta":{"line":368,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":389,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":418,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"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#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":191,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":199,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":207,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":216,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":254,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":262,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":280,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":37,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":10,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":28,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":49,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":76,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":109,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":130,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":142,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"meta":{"line":156,"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":170,"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":184,"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":198,"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":212,"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":226,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"meta":{"line":239,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":250,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":265,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#creationDate","name":"creationDate","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":98,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","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":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#creationDate","name":"creationDate","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.log);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.log);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#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":256,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disable_everyone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to each middle piece","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to each middle piece","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"api_request_method","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shard_id","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shard_count","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max_message_cache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_cache_lifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_sweep_interval","description":"How frequently to remove messages from the cache that are older than\nthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetch_all_members","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disable_everyone","description":"Default value for MessageOptions.disable_everyone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"rest_ws_bridge_timeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 2dca2d463..12625f4b4 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -7,6 +7,7 @@ const User = requireStructure('User'); const GuildMember = requireStructure('GuildMember'); const Role = requireStructure('Role'); const Invite = requireStructure('Invite'); +const Emoji = requireStructure('Emoji'); class RESTMethods { constructor(restManager) { @@ -516,6 +517,22 @@ class RESTMethods { }).catch(reject); }); } + + createEmoji(guild, image, name) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('post', `${Constants.Endpoints.guildEmojis(guild.id)}`, true, { name: name, image: image }) + .then(data => { + resolve(new Emoji(guild, data)); + }).catch(reject); + }); + } + + deleteEmoji(guild, id) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('delete', `${Constants.Endpoints.guildEmojis(guild.id)}/${id}`, true) + .then(resolve).catch(reject); + }); + } } module.exports = RESTMethods; diff --git a/src/structures/Guild.js b/src/structures/Guild.js index d9740b2cd..d4e6a2ef0 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -552,6 +552,43 @@ class Guild { return create.then(role => role.edit(data)); } + /** + * Creates a new custom emoji in the guild. + * @param {FileResolveable} attachment The image for the emoji. + * @param {string} name The name for the emoji. + * @returns {Promise} The created emoji. + * @example + * // create a new emoji from a url + * guild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip') + * .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`)) + * .catch(console.log); + * @example + * // create a new emoji from a file on your computer + * guild.createEmoji('./memes/banana.png', 'banana') + * .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`)) + * .catch(console.log); + */ + createEmoji(attachment, name) { + return new Promise((resolve, reject) => { + this.client.resolver.resolveFile(attachment).then(file => { + let base64 = new Buffer(file, 'binary').toString('base64'); + let dataURI = `data:;base64,${base64}`; + this.client.rest.methods.createEmoji(this, dataURI, name) + .then(resolve).catch(reject); + }).catch(reject); + }); + } + + /** + * Delete an emoji. + * @param {Emoji|string} emoji The emoji to delete. + * @returns {Promise} + */ + deleteEmoji(emoji) { + if (emoji instanceof Emoji) emoji = emoji.id; + return this.client.rest.methods.deleteEmoji(this, emoji); + } + /** * Causes the Client to leave the guild. * @returns {Promise} diff --git a/src/util/Constants.js b/src/util/Constants.js index 8d3c24d0e..4ecb0e2db 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -108,6 +108,7 @@ const Endpoints = exports.Endpoints = { guildMember: (guildID, memberID) => `${Endpoints.guildMembers(guildID)}/${memberID}`, stupidInconsistentGuildEndpoint: (guildID) => `${Endpoints.guildMember(guildID, '@me')}/nick`, guildChannels: (guildID) => `${Endpoints.guild(guildID)}/channels`, + guildEmojis: (guildID) => `${Endpoints.guild(guildID)}/emojis`, // channels channels: `${API}/channels`, From 3e9253827fe3f50479a36eb755d20305f635dda0 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Mon, 26 Sep 2016 20:07:16 -0500 Subject: [PATCH 009/188] add manage emojis constant (#744) * add manage emojis constant * this is why you don't commit on github i guess --- src/util/Constants.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util/Constants.js b/src/util/Constants.js index 4ecb0e2db..033c3c4e6 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -239,6 +239,8 @@ const PermissionFlags = exports.PermissionFlags = { CHANGE_NICKNAME: 1 << 26, MANAGE_NICKNAMES: 1 << 27, MANAGE_ROLES_OR_PERMISSIONS: 1 << 28, + + MANAGE_EMOJIS: 1 << 30, }; let _ALL_PERMISSIONS = 0; From f2cd48d94b560a8b509f1d2071a4acceb9fc1e38 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Mon, 26 Sep 2016 22:50:26 -0400 Subject: [PATCH 010/188] Reorganise Presence --- src/structures/Presence.js | 97 ++++++++++++++++++++------------------ 1 file changed, 50 insertions(+), 47 deletions(-) diff --git a/src/structures/Presence.js b/src/structures/Presence.js index 12060b7dc..59d9b439e 100644 --- a/src/structures/Presence.js +++ b/src/structures/Presence.js @@ -1,3 +1,51 @@ +/** + * Represents a User's presence + */ +class Presence { + constructor(data) { + /** + * The status of the presence: + * + * * **`online`** - user is online + * * **`offline`** - user is offline + * * **`idle`** - user is AFK + * @type {string} + */ + this.status = data.status || 'offline'; + + if (data.game) { + /** + * The game that the user is playing, `null` if they aren't playing a game. + * @type {Game} + */ + this.game = new Game(data.game); + } else { + this.game = null; + } + } + + update(data) { + this.status = data.status || this.status; + if (data.game) { + this.game = new Game(data.game); + } else { + this.game = null; + } + } + + /** + * Whether this presence is equal to another + * @param {Presence} other the presence to compare + * @returns {boolean} + */ + equals(other) { + return ( + this.status === other.status && + this.game ? this.game.equals(other.game) : !other.game + ); + } +} + /** * Represents a Game that is part of a User's presence. */ @@ -8,11 +56,13 @@ class Game { * @type {string} */ this.name = data.name; + /** * The type of the game status * @type {number} */ this.type = data.type; + /** * If the game is being streamed, a link to the stream * @type {string} @@ -43,52 +93,5 @@ class Game { } } -/** - * Represents a User's presence - */ -class Presence { - constructor(data) { - /** - * The status of the presence: - * - * * **`online`** - user is online - * * **`offline`** - user is offline - * * **`idle`** - user is AFK - * @type {string} - */ - this.status = data.status || 'offline'; - if (data.game) { - /** - * The game that the user is playing, `null` if they aren't playing a game. - * @type {Game} - */ - this.game = new Game(data.game); - } else { - this.game = null; - } - } - - /** - * Whether this presence is equal to another - * @param {Presence} other the presence to compare - * @returns {boolean} - */ - equals(other) { - return ( - this.status === other.status && - this.game ? this.game.equals(other.game) : !other.game - ); - } - - update(data) { - this.status = data.status || this.status; - if (data.game) { - this.game = new Game(data.game); - } else { - this.game = null; - } - } -} - exports.Presence = Presence; exports.Game = Game; From 909af2084f143562802c52b5a44bf86dcadc9d0e Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Mon, 26 Sep 2016 22:53:08 -0400 Subject: [PATCH 011/188] Clean up Presence --- src/structures/Presence.js | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/src/structures/Presence.js b/src/structures/Presence.js index 59d9b439e..ac528dfa9 100644 --- a/src/structures/Presence.js +++ b/src/structures/Presence.js @@ -13,24 +13,16 @@ class Presence { */ this.status = data.status || 'offline'; - if (data.game) { - /** - * The game that the user is playing, `null` if they aren't playing a game. - * @type {Game} - */ - this.game = new Game(data.game); - } else { - this.game = null; - } + /** + * The game that the user is playing, `null` if they aren't playing a game. + * @type {?Game} + */ + this.game = data.game ? new Game(data.game) : null; } update(data) { this.status = data.status || this.status; - if (data.game) { - this.game = new Game(data.game); - } else { - this.game = null; - } + this.game = data.game ? new Game(data.game) : null; } /** @@ -65,9 +57,9 @@ class Game { /** * If the game is being streamed, a link to the stream - * @type {string} + * @type {?string} */ - this.url = data.url; + this.url = data.url || null; } /** From 0c0c1da0d5120097e831c50d77a034986a15e57f Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Mon, 26 Sep 2016 22:53:35 -0400 Subject: [PATCH 012/188] Fix Presence/Game.equals with null/undefined --- src/structures/Presence.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/structures/Presence.js b/src/structures/Presence.js index ac528dfa9..e38efd3af 100644 --- a/src/structures/Presence.js +++ b/src/structures/Presence.js @@ -32,6 +32,7 @@ class Presence { */ equals(other) { return ( + other && this.status === other.status && this.game ? this.game.equals(other.game) : !other.game ); @@ -78,6 +79,7 @@ class Game { */ equals(other) { return ( + other && this.name === other.name && this.type === other.type && this.url === other.url From e5f4823bd40e1aee5a6874782c8ceab894ab61e9 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Mon, 26 Sep 2016 22:56:07 -0400 Subject: [PATCH 013/188] Document do not disturb --- src/structures/Presence.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/structures/Presence.js b/src/structures/Presence.js index e38efd3af..3877d0220 100644 --- a/src/structures/Presence.js +++ b/src/structures/Presence.js @@ -9,6 +9,7 @@ class Presence { * * **`online`** - user is online * * **`offline`** - user is offline * * **`idle`** - user is AFK + * * **`dnd`** - user is in Do not Disturb * @type {string} */ this.status = data.status || 'offline'; From 9ebe5e64b7164b72f81a3c3b059a36cc21304b1d Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Mon, 26 Sep 2016 22:58:23 -0400 Subject: [PATCH 014/188] Fix Hydra's disregard of the alphabet --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 0584bed2e..1480ca4bf 100644 --- a/src/index.js +++ b/src/index.js @@ -11,6 +11,7 @@ module.exports = { DMChannel: require('./structures/DMChannel'), Emoji: require('./structures/Emoji'), EvaluatedPermissions: require('./structures/EvaluatedPermissions'), + Game: require('./structures/Presence').Game, GroupDMChannel: require('./structures/GroupDMChannel'), Guild: require('./structures/Guild'), GuildChannel: require('./structures/GuildChannel'), @@ -23,12 +24,11 @@ module.exports = { PartialGuild: require('./structures/PartialGuild'), PartialGuildChannel: require('./structures/PartialGuildChannel'), PermissionOverwrites: require('./structures/PermissionOverwrites'), + Presence: require('./structures/Presence').Presence, Role: require('./structures/Role'), TextChannel: require('./structures/TextChannel'), User: require('./structures/User'), VoiceChannel: require('./structures/VoiceChannel'), - Presence: require('./structures/Presence').Presence, - Game: require('./structures/Presence').Game, version: require(path.join(__dirname, '..', 'package')).version, }; From ecbc591c956ce4d454d663bfe07c223f4f4ae520 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Mon, 26 Sep 2016 23:16:29 -0400 Subject: [PATCH 015/188] Update setStatus docs for DND, other docs - setStatus code needs updating --- src/structures/ClientUser.js | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index 15a93570a..a21367248 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -37,7 +37,7 @@ class ClientUser extends User { * // set username * client.user.setUsername('discordjs') * .then(user => console.log(`My new username is ${user.username}`)) - * .catch(console.log); + * .catch(console.error); */ setUsername(username) { return this.client.rest.methods.updateCurrentUser({ username }); @@ -52,7 +52,7 @@ class ClientUser extends User { * // set email * client.user.setEmail('bob@gmail.com') * .then(user => console.log(`My new email is ${user.email}`)) - * .catch(console.log); + * .catch(console.error); */ setEmail(email) { return this.client.rest.methods.updateCurrentUser({ email }); @@ -65,9 +65,9 @@ class ClientUser extends User { * @returns {Promise} * @example * // set password - * client.user.setPassword('password') + * client.user.setPassword('password123') * .then(user => console.log('New password set!')) - * .catch(console.log); + * .catch(console.error); */ setPassword(password) { return this.client.rest.methods.updateCurrentUser({ password }); @@ -81,7 +81,7 @@ class ClientUser extends User { * // set avatar * client.user.setAvatar(fs.readFileSync('./avatar.png')) * .then(user => console.log(`New avatar set!`)) - * .catch(console.log); + * .catch(console.error); */ setAvatar(avatar) { return this.client.rest.methods.updateCurrentUser({ avatar }); @@ -89,16 +89,21 @@ 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} [status] The status, can be `online`, `idle`, or `dnd` * @param {string|Object} [game] The game that is being played * @param {string} [url] If you want to display as streaming, set this as the URL to the stream (must be a * twitch.tv URl) * @returns {Promise} * @example * // set status - * client.user.setStatus('status', 'game') + * client.user.setStatus('dnd') * .then(user => console.log('Changed status!')) - * .catch(console.log); + * .catch(console.error); + * @example + * // set game + * client.user.setStatus(null, 'Cool Game 2042') + * .then(user => console.log('Changed game!')) + * .catch(console.error); */ setStatus(status, game = null, url = null) { return new Promise(resolve => { From 36f4df29311016658187d9042e5260aacdd13e33 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Mon, 26 Sep 2016 23:18:39 -0400 Subject: [PATCH 016/188] Capitalise two letters --- src/client/websocket/WebSocketManager.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index aa3b08b7d..3cd7d9d2e 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -150,7 +150,7 @@ class WebSocketManager extends EventEmitter { this._sendNewIdentify(); return; } - this.client.emit('debug', 'identifying as resumed session'); + this.client.emit('debug', 'Identifying as resumed session'); const payload = { token: this.client.token, session_id: this.sessionID, @@ -173,7 +173,7 @@ class WebSocketManager extends EventEmitter { if (this.client.options.shard_count > 0) { payload.shard = [Number(this.client.options.shard_id), Number(this.client.options.shard_count)]; } - this.client.emit('debug', 'identifying as new session'); + this.client.emit('debug', 'Identifying as new session'); this.send({ op: Constants.OPCodes.IDENTIFY, d: payload, From d240fe4182057762cd46c14a99316a2f8c30c999 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Mon, 26 Sep 2016 23:21:44 -0400 Subject: [PATCH 017/188] Improve prepend/append descriptions --- src/structures/interface/TextBasedChannel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 8a4609a64..f1194c34e 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -38,8 +38,8 @@ class TextBasedChannel { * @typedef {Object} SplitOptions * @property {number} [maxLength=1950] Maximum character length per message piece * @property {string} [char='\n'] Character to split the message with - * @property {string} [prepend=''] Text to prepend to each middle piece - * @property {string} [append=''] Text to append to each middle piece + * @property {string} [prepend=''] Text to prepend to every piece except the first + * @property {string} [append=''] Text to append to every piece except the last */ /** From 4fe30aa4d3f21470b6b4d4f300c3714c9f76cc9b Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Mon, 26 Sep 2016 23:23:56 -0400 Subject: [PATCH 018/188] Rip out client sharding logic into its own class --- docs/docs.json | 2 +- src/client/Client.js | 26 +++++++--------------- src/sharding/ShardUtil.js | 47 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 19 deletions(-) create mode 100644 src/sharding/ShardUtil.js diff --git a/docs/docs.json b/docs/docs.json index 205ab14cf..911754b04 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1474914314244},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":18,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":235,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":255,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":270,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":280,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":292,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `message_cache_lifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":29,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":92,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":104,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":117,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":123,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":129,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":135,"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":141,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":174,"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":183,"file":"Client.js","path":"src/client"},"props":[]},{"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#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"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":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:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":356,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":362,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":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":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":189,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":225,"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":235,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":277,"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":684,"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":707,"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":732,"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":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.log);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.log);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":7,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":53,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":67,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":109,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"The manager of the spawned shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":17,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"The shard ID","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":23,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"The process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":29,"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":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":58,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. THIS IS NOT NEEDED IN ANY NORMAL CASE!","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":76,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":111,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":122,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":137,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":50,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":61,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":103,"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",""]]]}},{"name":"url","description":"If you want to display as streaming, set this as the URL to the stream (must be a\ntwitch.tv URl)","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#creationDate","name":"creationDate","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"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":92,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#creationDate","name":"creationDate","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":58,"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":67,"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":80,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":95,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":121,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":84,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":272,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":280,"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":288,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":297,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":311,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.log);"],"meta":{"line":345,"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":359,"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":373,"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":387,"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":401,"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":415,"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":429,"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":443,"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":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":507,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log)"],"meta":{"line":549,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.log);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.log);"],"meta":{"line":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":587,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"meta":{"line":601,"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":614,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":625,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":662,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":80,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":104,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":110,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":116,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":122,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":128,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":135,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":141,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":147,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":153,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":170,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#creationDate","name":"creationDate","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"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":223,"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":232,"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":242,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":251,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":260,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":230,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":241,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":260,"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":269,"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":278,"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":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":321,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":330,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":351,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":359,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":367,"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":380,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":391,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":95,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":103,"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":112,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":130,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":141,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":150,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":159,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":168,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":205,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":127,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":138,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":102,"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":110,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":119,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":291,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.log);"],"meta":{"line":306,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":325,"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":333,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"meta":{"line":347,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.log);"],"meta":{"line":368,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":389,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":418,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"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#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":191,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":199,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":207,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":216,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":254,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":262,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":280,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":37,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":10,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":28,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":49,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":76,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":109,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":130,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":142,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"meta":{"line":156,"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":170,"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":184,"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":198,"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":212,"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":226,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"meta":{"line":239,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":250,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":265,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#creationDate","name":"creationDate","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":98,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","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":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#creationDate","name":"creationDate","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.log);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.log);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#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":256,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disable_everyone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to each middle piece","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to each middle piece","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"api_request_method","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shard_id","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shard_count","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max_message_cache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_cache_lifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_sweep_interval","description":"How frequently to remove messages from the cache that are older than\nthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetch_all_members","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disable_everyone","description":"Default value for MessageOptions.disable_everyone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"rest_ws_bridge_timeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1474946633413},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":216,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":225,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":245,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":260,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":270,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":282,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `message_cache_lifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":100,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":106,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":112,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":119,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":125,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#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":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]}],"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:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":346,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":352,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":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":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":189,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":225,"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":235,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":277,"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":684,"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":707,"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":732,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.log);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.log);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":7,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":53,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":67,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":109,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"The manager of the spawned shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":17,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"The shard ID","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":23,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"The process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":29,"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\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":58,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. THIS IS NOT NEEDED IN ANY NORMAL CASE!","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":76,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":111,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":122,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":137,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":50,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":61,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"ShardUtil","name":"ShardUtil","description":"Helper class for sharded clients","meta":{"line":4,"file":"ShardUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardUtil()","name":"ShardUtil","memberof":"ShardUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardUtil#_handleMessage","name":"_handleMessage","description":"Handles an IPC message","memberof":"ShardUtil","meta":{"line":16,"file":"ShardUtil.js","path":"src/sharding"},"returns":{"types":[[["null",""]]]},"params":[{"name":"message","description":"Message received","type":{"types":[["*",""]]}}]},{"id":"ShardUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardUtil","meta":{"line":37,"file":"ShardUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[],"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\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\rclient.user.setStatus('dnd')\r .then(user => console.log('Changed status!'))\r .catch(console.error);","// set game\rclient.user.setStatus(null, 'Cool Game 2042')\r .then(user => console.log('Changed game!'))\r .catch(console.error);"],"meta":{"line":108,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"The status, can be `online`, `idle`, or `dnd`","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"The game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}},{"name":"url","description":"If you want to display as streaming, set this as the URL to the stream (must be a\rtwitch.tv URl)","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#creationDate","name":"creationDate","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":92,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#creationDate","name":"creationDate","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":58,"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":67,"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":80,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":95,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":121,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":84,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":272,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":280,"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":288,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":297,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":311,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.log);"],"meta":{"line":345,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.log);"],"meta":{"line":359,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.log);"],"meta":{"line":401,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.log);"],"meta":{"line":429,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.log);"],"meta":{"line":443,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.log);"],"meta":{"line":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":507,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.log);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.log)"],"meta":{"line":549,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.log);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.log);"],"meta":{"line":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":587,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.log);"],"meta":{"line":601,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.log);"],"meta":{"line":614,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":625,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":662,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":80,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":104,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":110,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":116,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":122,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":128,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":135,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":141,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":147,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":153,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":170,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#creationDate","name":"creationDate","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"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":223,"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":232,"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":242,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":251,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":260,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.log);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.log);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.log);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.log);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":230,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":241,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":260,"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":269,"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":278,"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":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":321,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":330,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":351,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":359,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":367,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":380,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":391,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":95,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":103,"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":112,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":130,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":141,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":150,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":159,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":168,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":205,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":127,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":138,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":102,"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":110,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":119,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":291,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.log);"],"meta":{"line":306,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":325,"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":333,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.log);"],"meta":{"line":347,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.log);"],"meta":{"line":368,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":389,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":418,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":191,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":199,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":207,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":216,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":254,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":262,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":280,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":109,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":130,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":142,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.log);"],"meta":{"line":156,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.log);"],"meta":{"line":170,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.log);"],"meta":{"line":184,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.log);"],"meta":{"line":198,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.log);"],"meta":{"line":212,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.log);"],"meta":{"line":226,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.log);"],"meta":{"line":239,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":250,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":265,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#creationDate","name":"creationDate","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":98,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#creationDate","name":"creationDate","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.log);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.log);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":256,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disable_everyone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"api_request_method","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shard_id","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shard_count","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max_message_cache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_cache_lifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_sweep_interval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetch_all_members","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disable_everyone","description":"Default value for MessageOptions.disable_everyone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"rest_ws_bridge_timeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/client/Client.js b/src/client/Client.js index 861fcb465..80108a3b9 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -10,6 +10,7 @@ const WebSocketManager = require('./websocket/WebSocketManager'); const ActionsManager = require('./actions/ActionsManager'); const Collection = require('../util/Collection'); const Presence = require('../structures/Presence').Presence; +const ShardUtil = require('../sharding/ShardUtil'); /** * The starting point for making a Discord Bot. @@ -85,6 +86,13 @@ class Client extends EventEmitter { */ this.voice = new ClientVoiceManager(this); + /** + * The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager) + * @type {?ShardUtil} + */ + this.shard = process.send ? ShardUtil.singleton(this) : null; + if (this.shard) process.on('message', this.shard._handleMessage.bind(this.shard)); + /** * A Collection of the Client's stored users * @type {Collection} @@ -146,24 +154,6 @@ class Client extends EventEmitter { if (this.options.message_sweep_interval > 0) { this.setInterval(this.sweepMessages.bind(this), this.options.message_sweep_interval * 1000); } - - if (process.send) { - process.on('message', message => { - if (!message) return; - if (message._eval) { - try { - process.send({ _evalResult: eval(message._eval) }); - } catch (err) { - process.send({ _evalError: err }); - } - } else if (message._fetchProp) { - const props = message._fetchProp.split('.'); - let value = this; // eslint-disable-line consistent-this - for (const prop of props) value = value[prop]; - process.send({ _fetchProp: message._fetchProp, _fetchPropValue: value }); - } - }); - } } /** diff --git a/src/sharding/ShardUtil.js b/src/sharding/ShardUtil.js new file mode 100644 index 000000000..bb0641fe2 --- /dev/null +++ b/src/sharding/ShardUtil.js @@ -0,0 +1,47 @@ +/** + * Helper class for sharded clients + */ +class ShardUtil { + /** + * @param {Client} client Client of the current shard + */ + constructor(client) { + this.client = client; + } + + /** + * Handles an IPC message + * @param {*} message Message received + */ + _handleMessage(message) { + if (!message) return; + if (message._eval) { + try { + process.send({ _evalResult: eval(message._eval) }); + } catch (err) { + process.send({ _evalError: err }); + } + } else if (message._fetchProp) { + const props = message._fetchProp.split('.'); + let value = this; // eslint-disable-line consistent-this + for (const prop of props) value = value[prop]; + process.send({ _fetchProp: message._fetchProp, _fetchPropValue: value }); + } + } + + /** + * Creates/gets the singleton of this class + * @param {Client} client Client to use + * @returns {ShardUtil} + */ + static singleton(client) { + if (!this._singleton) { + this._singleton = new this(client); + } else { + client.emit('error', 'Multiple clients created in child process; only the first will handle sharding helpers.'); + } + return this._singleton; + } +} + +module.exports = ShardUtil; From c26fc49cafaa6eef8ac22c3a9b20b512e3789c46 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Mon, 26 Sep 2016 23:34:47 -0400 Subject: [PATCH 019/188] Fix property fetching --- src/sharding/ShardUtil.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sharding/ShardUtil.js b/src/sharding/ShardUtil.js index bb0641fe2..a2319d322 100644 --- a/src/sharding/ShardUtil.js +++ b/src/sharding/ShardUtil.js @@ -23,7 +23,7 @@ class ShardUtil { } } else if (message._fetchProp) { const props = message._fetchProp.split('.'); - let value = this; // eslint-disable-line consistent-this + let value = this.client; for (const prop of props) value = value[prop]; process.send({ _fetchProp: message._fetchProp, _fetchPropValue: value }); } From e5a987e0ef38a05a274883088cbb136bf6ed784d Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Tue, 27 Sep 2016 02:19:53 -0400 Subject: [PATCH 020/188] Add client shard eval/client property fetching, and improve existing shard stuff --- docs/docs.json | 2 +- src/client/Client.js | 8 +- src/sharding/Shard.js | 29 ++----- src/sharding/ShardClientUtil.js | 138 ++++++++++++++++++++++++++++++++ src/sharding/ShardUtil.js | 47 ----------- src/sharding/ShardingManager.js | 17 ++++ src/util/MakeError.js | 7 ++ 7 files changed, 177 insertions(+), 71 deletions(-) create mode 100644 src/sharding/ShardClientUtil.js delete mode 100644 src/sharding/ShardUtil.js create mode 100644 src/util/MakeError.js diff --git a/docs/docs.json b/docs/docs.json index 911754b04..413dd8337 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1474946633413},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":216,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":225,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":245,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":260,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":270,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":282,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `message_cache_lifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":100,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":106,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":112,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":119,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":125,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#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":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]}],"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:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":346,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":352,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":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":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":189,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":225,"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":235,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":277,"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":684,"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":707,"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":732,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.log);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.log);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":7,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":53,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":67,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":109,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"The manager of the spawned shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":17,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"The shard ID","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":23,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"The process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":29,"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\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":58,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. THIS IS NOT NEEDED IN ANY NORMAL CASE!","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":76,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":111,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":122,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":137,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":50,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":61,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"ShardUtil","name":"ShardUtil","description":"Helper class for sharded clients","meta":{"line":4,"file":"ShardUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardUtil()","name":"ShardUtil","memberof":"ShardUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardUtil#_handleMessage","name":"_handleMessage","description":"Handles an IPC message","memberof":"ShardUtil","meta":{"line":16,"file":"ShardUtil.js","path":"src/sharding"},"returns":{"types":[[["null",""]]]},"params":[{"name":"message","description":"Message received","type":{"types":[["*",""]]}}]},{"id":"ShardUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardUtil","meta":{"line":37,"file":"ShardUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[],"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\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\rclient.user.setStatus('dnd')\r .then(user => console.log('Changed status!'))\r .catch(console.error);","// set game\rclient.user.setStatus(null, 'Cool Game 2042')\r .then(user => console.log('Changed game!'))\r .catch(console.error);"],"meta":{"line":108,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"The status, can be `online`, `idle`, or `dnd`","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"The game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}},{"name":"url","description":"If you want to display as streaming, set this as the URL to the stream (must be a\rtwitch.tv URl)","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#creationDate","name":"creationDate","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":92,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#creationDate","name":"creationDate","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":58,"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":67,"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":80,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":95,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":121,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":84,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":272,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":280,"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":288,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":297,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":311,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.log);"],"meta":{"line":345,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.log);"],"meta":{"line":359,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.log);"],"meta":{"line":401,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.log);"],"meta":{"line":429,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.log);"],"meta":{"line":443,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.log);"],"meta":{"line":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":507,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.log);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.log)"],"meta":{"line":549,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.log);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.log);"],"meta":{"line":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":587,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.log);"],"meta":{"line":601,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.log);"],"meta":{"line":614,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":625,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":662,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":80,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":104,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":110,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":116,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":122,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":128,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":135,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":141,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":147,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":153,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":170,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#creationDate","name":"creationDate","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"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":223,"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":232,"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":242,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":251,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":260,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.log);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.log);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.log);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.log);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":230,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":241,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":260,"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":269,"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":278,"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":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":321,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":330,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":351,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":359,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":367,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":380,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":391,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":95,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":103,"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":112,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":130,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":141,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":150,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":159,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":168,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":205,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":127,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":138,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":102,"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":110,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":119,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":291,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.log);"],"meta":{"line":306,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":325,"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":333,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.log);"],"meta":{"line":347,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.log);"],"meta":{"line":368,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":389,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":418,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":191,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":199,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":207,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":216,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":254,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":262,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":280,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":109,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":130,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":142,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.log);"],"meta":{"line":156,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.log);"],"meta":{"line":170,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.log);"],"meta":{"line":184,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.log);"],"meta":{"line":198,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.log);"],"meta":{"line":212,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.log);"],"meta":{"line":226,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.log);"],"meta":{"line":239,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":250,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":265,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#creationDate","name":"creationDate","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":98,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#creationDate","name":"creationDate","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.log);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.log);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":256,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disable_everyone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"api_request_method","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shard_id","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shard_count","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max_message_cache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_cache_lifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_sweep_interval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetch_all_members","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disable_everyone","description":"Default value for MessageOptions.disable_everyone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"rest_ws_bridge_timeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1474957013620},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":216,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":225,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":245,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":260,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":270,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":282,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `message_cache_lifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":100,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":106,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":112,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":119,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":125,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#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":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]}],"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:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":350,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":356,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":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":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":189,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":225,"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":235,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":277,"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":684,"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":707,"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":732,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.log);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.log);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":8,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":50,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":64,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":96,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"The manager of the spawned shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":18,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"The shard ID","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":24,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"The process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":30,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":6,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":35,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":49,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":74,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#_handleMessage","name":"_handleMessage","description":"Handles an IPC message","memberof":"ShardClientUtil","meta":{"line":94,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["null",""]]]},"params":[{"name":"message","description":"Message received","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#_respond","name":"_respond","description":"Sends a message to the master process, emitting an error from the client upon failure","memberof":"ShardClientUtil","meta":{"line":117,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["null",""]]]},"params":[{"name":"type","description":"Type of response to send","type":{"types":[[["string",""]]]}},{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":128,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. THIS IS NOT NEEDED IN ANY NORMAL CASE!","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":93,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":128,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":139,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":154,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":78,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\rclient.user.setStatus('dnd')\r .then(user => console.log('Changed status!'))\r .catch(console.error);","// set game\rclient.user.setStatus(null, 'Cool Game 2042')\r .then(user => console.log('Changed game!'))\r .catch(console.error);"],"meta":{"line":108,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"The status, can be `online`, `idle`, or `dnd`","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"The game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}},{"name":"url","description":"If you want to display as streaming, set this as the URL to the stream (must be a\rtwitch.tv URl)","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#creationDate","name":"creationDate","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":92,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#creationDate","name":"creationDate","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":58,"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":67,"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":80,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":95,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":121,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":84,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":272,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":280,"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":288,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":297,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":311,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.log);"],"meta":{"line":345,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.log);"],"meta":{"line":359,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.log);"],"meta":{"line":401,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.log);"],"meta":{"line":429,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.log);"],"meta":{"line":443,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.log);"],"meta":{"line":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":507,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.log);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.log)"],"meta":{"line":549,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.log);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.log);"],"meta":{"line":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":587,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.log);"],"meta":{"line":601,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.log);"],"meta":{"line":614,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":625,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":662,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":80,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":104,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":110,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":116,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":122,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":128,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":135,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":141,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":147,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":153,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":170,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#creationDate","name":"creationDate","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"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":223,"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":232,"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":242,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":251,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":260,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.log);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.log);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.log);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.log);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":230,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":241,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":260,"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":269,"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":278,"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":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":321,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":330,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":351,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":359,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":367,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":380,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":391,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":95,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":103,"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":112,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":130,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":141,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":150,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":159,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":168,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":205,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":127,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":138,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":102,"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":110,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":119,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":291,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.log);"],"meta":{"line":306,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":325,"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":333,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.log);"],"meta":{"line":347,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.log);"],"meta":{"line":368,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":389,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":418,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":191,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":199,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":207,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":216,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":254,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":262,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":280,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":109,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":130,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":142,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.log);"],"meta":{"line":156,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.log);"],"meta":{"line":170,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.log);"],"meta":{"line":184,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.log);"],"meta":{"line":198,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.log);"],"meta":{"line":212,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.log);"],"meta":{"line":226,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.log);"],"meta":{"line":239,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":250,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":265,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#creationDate","name":"creationDate","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":98,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#creationDate","name":"creationDate","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.log);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.log);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":256,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disable_everyone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"api_request_method","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shard_id","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shard_count","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max_message_cache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_cache_lifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_sweep_interval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetch_all_members","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disable_everyone","description":"Default value for MessageOptions.disable_everyone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"rest_ws_bridge_timeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/client/Client.js b/src/client/Client.js index 80108a3b9..84fa2cadf 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -10,7 +10,7 @@ const WebSocketManager = require('./websocket/WebSocketManager'); const ActionsManager = require('./actions/ActionsManager'); const Collection = require('../util/Collection'); const Presence = require('../structures/Presence').Presence; -const ShardUtil = require('../sharding/ShardUtil'); +const ShardClientUtil = require('../sharding/ShardClientUtil'); /** * The starting point for making a Discord Bot. @@ -90,7 +90,7 @@ class Client extends EventEmitter { * The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager) * @type {?ShardUtil} */ - this.shard = process.send ? ShardUtil.singleton(this) : null; + this.shard = process.send ? ShardClientUtil.singleton(this) : null; if (this.shard) process.on('message', this.shard._handleMessage.bind(this.shard)); /** @@ -339,6 +339,10 @@ class Client extends EventEmitter { } this.presences.set(id, new Presence(presence)); } + + _eval(script) { + return eval(script); + } } module.exports = Client; diff --git a/src/sharding/Shard.js b/src/sharding/Shard.js index 85321fbb0..21fb1f4ea 100644 --- a/src/sharding/Shard.js +++ b/src/sharding/Shard.js @@ -1,5 +1,6 @@ const childProcess = require('child_process'); const path = require('path'); +const makeError = require('../util/MakeError'); /** * Represents a Shard spawned by the ShardingManager. @@ -32,11 +33,7 @@ class Shard { SHARD_COUNT: this.manager.totalShards, }, }); - - this.process.on('message', message => { - this.manager.emit('message', this, message); - }); - + this.process.on('message', message => { this.manager.emit('message', this, message); }); this.process.once('exit', () => { if (this.manager.respawn) this.manager.createShard(this.id); }); @@ -69,20 +66,10 @@ class Shard { const promise = new Promise((resolve, reject) => { const listener = message => { - if (!message) return; - if (message._evalResult) { - this.process.removeListener('message', listener); - this._evals.delete(script); - resolve(message._evalResult); - } else if (message._evalError) { - this.process.removeListener('message', listener); - const err = new Error(message._evalError.message, message._evalError.fileName, message._evalError.lineNumber); - err.name = message._evalError.name; - err.columnNumber = message._evalError.columnNumber; - err.stack = message._evalError.stack; - this._evals.delete(script); - reject(err); - } + if (!message || message._eval !== script) return; + this.process.removeListener('message', listener); + this._evals.delete(script); + if (!message._error) resolve(message._result); else reject(makeError(message._error)); }; this.process.on('message', listener); @@ -111,10 +98,10 @@ class Shard { const promise = new Promise((resolve, reject) => { const listener = message => { - if (typeof message !== 'object' || message._fetchProp !== prop) return; + if (!message || message._fetchProp !== prop) return; this.process.removeListener('message', listener); this._fetches.delete(prop); - resolve(message._fetchPropValue); + resolve(message._result); }; this.process.on('message', listener); diff --git a/src/sharding/ShardClientUtil.js b/src/sharding/ShardClientUtil.js new file mode 100644 index 000000000..682968191 --- /dev/null +++ b/src/sharding/ShardClientUtil.js @@ -0,0 +1,138 @@ +const makeError = require('../util/MakeError'); + +/** + * Helper class for sharded clients spawned as a child process, such as from a ShardingManager + */ +class ShardClientUtil { + /** + * @param {Client} client Client of the current shard + */ + constructor(client) { + this.client = client; + } + + /** + * ID of this shard + * @type {number} + */ + get id() { + return this.client.options.shard_id; + } + + /** + * Total number of shards + * @type {number} + */ + get count() { + return this.client.options.shard_count; + } + + /** + * Sends a message to the master process + * @param {*} message Message to send + * @returns {Promise} + */ + send(message) { + return new Promise((resolve, reject) => { + const sent = process.send(message, err => { + if (err) reject(err); else resolve(); + }); + if (!sent) throw new Error('Failed to send message to master process.'); + }); + } + + /** + * Evaluates a script on all shards, in the context of the Clients. + * @param {string} script JavaScript to run on each shard + * @returns {Promise} Results of the script execution + */ + broadcastEval(script) { + return new Promise((resolve, reject) => { + const listener = message => { + if (!message || message._sEval !== script) return; + process.removeListener('message', listener); + if (!message._error) resolve(message._result); else reject(makeError(message._error)); + }; + process.on('message', listener); + + this.send({ _sEval: script }).catch(err => { + process.removeListener('message', listener); + reject(err); + }); + }); + } + + /** + * Fetches a Client property value of each shard. + * @param {string} prop Name of the Client property to get, using periods for nesting + * @returns {Promise} + * @example + * manager.fetchClientValues('guilds.size').then(results => { + * console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`); + * }).catch(console.error); + */ + fetchClientValues(prop) { + return new Promise((resolve, reject) => { + const listener = message => { + if (!message || message._sFetchProp !== prop) return; + process.removeListener('message', listener); + if (!message._error) resolve(message._result); else reject(makeError(message._error)); + }; + process.on('message', listener); + + this.send({ _sFetchProp: prop }).catch(err => { + process.removeListener('message', listener); + reject(err); + }); + }); + } + + /** + * Handles an IPC message + * @param {*} message Message received + * @private + */ + _handleMessage(message) { + if (!message) return; + if (message._eval) { + try { + this._respond('eval', { _eval: message._eval, _result: this.client._eval(message._eval) }); + } catch (err) { + this._respond('eval', { _eval: message._eval, _error: err }); + } + } else if (message._fetchProp) { + const props = message._fetchProp.split('.'); + let value = this.client; + for (const prop of props) value = value[prop]; + this._respond('fetchProp', { _fetchProp: message._fetchProp, _result: value }); + } + } + + /** + * Sends a message to the master process, emitting an error from the client upon failure + * @param {string} type Type of response to send + * @param {*} message Message to send + * @private + */ + _respond(type, message) { + this.send(message).catch(err => + this.client.emit('error', `Error when sending ${type} response to master process: ${err}`) + ); + } + + /** + * Creates/gets the singleton of this class + * @param {Client} client Client to use + * @returns {ShardUtil} + */ + static singleton(client) { + if (!this._singleton) { + this._singleton = new this(client); + } else { + client.emit('error', 'Multiple clients created in child process; only the first will handle sharding helpers.'); + } + return this._singleton; + } +} + +module.exports = ShardClientUtil; diff --git a/src/sharding/ShardUtil.js b/src/sharding/ShardUtil.js deleted file mode 100644 index a2319d322..000000000 --- a/src/sharding/ShardUtil.js +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Helper class for sharded clients - */ -class ShardUtil { - /** - * @param {Client} client Client of the current shard - */ - constructor(client) { - this.client = client; - } - - /** - * Handles an IPC message - * @param {*} message Message received - */ - _handleMessage(message) { - if (!message) return; - if (message._eval) { - try { - process.send({ _evalResult: eval(message._eval) }); - } catch (err) { - process.send({ _evalError: err }); - } - } else if (message._fetchProp) { - const props = message._fetchProp.split('.'); - let value = this.client; - for (const prop of props) value = value[prop]; - process.send({ _fetchProp: message._fetchProp, _fetchPropValue: value }); - } - } - - /** - * Creates/gets the singleton of this class - * @param {Client} client Client to use - * @returns {ShardUtil} - */ - static singleton(client) { - if (!this._singleton) { - this._singleton = new this(client); - } else { - client.emit('error', 'Multiple clients created in child process; only the first will handle sharding helpers.'); - } - return this._singleton; - } -} - -module.exports = ShardUtil; diff --git a/src/sharding/ShardingManager.js b/src/sharding/ShardingManager.js index 2f71427d6..6e2524b4d 100644 --- a/src/sharding/ShardingManager.js +++ b/src/sharding/ShardingManager.js @@ -41,6 +41,10 @@ class ShardingManager extends EventEmitter { if (totalShards < 1) throw new RangeError('Amount of shards must be at least 1.'); if (totalShards !== Math.floor(totalShards)) throw new RangeError('Amount of shards must be an integer.'); + /** + * Whether shards should automatically respawn upon exiting + * @type {boolean} + */ this.respawn = respawn; /** @@ -48,6 +52,19 @@ class ShardingManager extends EventEmitter { * @type {Collection} */ this.shards = new Collection(); + + this.on('message', (shard, message) => { + if (!message) return; + if (message._sEval) { + this.broadcastEval(message._sEval) + .then(results => shard.send({ _sEval: message._sEval, _result: results })) + .catch(err => shard.send({ _sEval: message._sEval, _error: err })); + } else if (message._sFetchProp) { + this.fetchClientValues(message._sFetchProp) + .then(results => shard.send({ _sFetchProp: message._sFetchProp, _result: results })) + .catch(err => shard.send({ _sFetchProp: message._sFetchProp, _error: err })); + } + }); } /** diff --git a/src/util/MakeError.js b/src/util/MakeError.js new file mode 100644 index 000000000..12e8b3203 --- /dev/null +++ b/src/util/MakeError.js @@ -0,0 +1,7 @@ +module.exports = function makeError(obj) { + const err = new Error(obj.message, obj.fileName, obj.lineNumber); + err.name = obj.name; + err.columnNumber = obj.columnNumber; + err.stack = obj.stack; + return err; +}; From 9d3b7b49dd2a4f4b71be5ee2d71cea19f8bffc96 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Tue, 27 Sep 2016 02:25:38 -0400 Subject: [PATCH 021/188] Cleanup and reorganise some shard stuff --- docs/docs.json | 2 +- src/sharding/Shard.js | 62 ++++++++++++++++----------------- src/sharding/ShardClientUtil.js | 54 ++++++++++++++-------------- src/sharding/ShardingManager.js | 12 +++---- 4 files changed, 65 insertions(+), 65 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 413dd8337..64fc5a6c4 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1474957013620},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":216,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":225,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":245,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":260,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":270,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":282,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `message_cache_lifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":100,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":106,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":112,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":119,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":125,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#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":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]}],"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:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":350,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":356,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":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":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":189,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":225,"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":235,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":277,"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":684,"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":707,"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":732,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.log);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.log);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":8,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":50,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":64,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":96,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"The manager of the spawned shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":18,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"The shard ID","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":24,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"The process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":30,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":6,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":35,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":49,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":74,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#_handleMessage","name":"_handleMessage","description":"Handles an IPC message","memberof":"ShardClientUtil","meta":{"line":94,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["null",""]]]},"params":[{"name":"message","description":"Message received","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#_respond","name":"_respond","description":"Sends a message to the master process, emitting an error from the client upon failure","memberof":"ShardClientUtil","meta":{"line":117,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["null",""]]]},"params":[{"name":"type","description":"Type of response to send","type":{"types":[[["string",""]]]}},{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":128,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. THIS IS NOT NEEDED IN ANY NORMAL CASE!","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":93,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":128,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":139,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":154,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":78,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\rclient.user.setStatus('dnd')\r .then(user => console.log('Changed status!'))\r .catch(console.error);","// set game\rclient.user.setStatus(null, 'Cool Game 2042')\r .then(user => console.log('Changed game!'))\r .catch(console.error);"],"meta":{"line":108,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"The status, can be `online`, `idle`, or `dnd`","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"The game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}},{"name":"url","description":"If you want to display as streaming, set this as the URL to the stream (must be a\rtwitch.tv URl)","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#creationDate","name":"creationDate","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":92,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#creationDate","name":"creationDate","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":58,"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":67,"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":80,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":95,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":121,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":84,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":272,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":280,"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":288,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":297,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":311,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.log);"],"meta":{"line":345,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.log);"],"meta":{"line":359,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.log);"],"meta":{"line":401,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.log);"],"meta":{"line":429,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.log);"],"meta":{"line":443,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.log);"],"meta":{"line":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":507,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.log);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.log)"],"meta":{"line":549,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.log);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.log);"],"meta":{"line":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":587,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.log);"],"meta":{"line":601,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.log);"],"meta":{"line":614,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":625,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":662,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":80,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":104,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":110,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":116,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":122,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":128,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":135,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":141,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":147,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":153,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":170,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#creationDate","name":"creationDate","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"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":223,"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":232,"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":242,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":251,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":260,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.log);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.log);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.log);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.log);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":230,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":241,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":260,"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":269,"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":278,"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":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":321,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":330,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":351,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":359,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":367,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":380,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":391,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":95,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":103,"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":112,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":130,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":141,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":150,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":159,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":168,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":205,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":127,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":138,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":102,"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":110,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":119,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":291,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.log);"],"meta":{"line":306,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":325,"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":333,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.log);"],"meta":{"line":347,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.log);"],"meta":{"line":368,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":389,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":418,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":191,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":199,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":207,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":216,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":254,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":262,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":280,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":109,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":130,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":142,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.log);"],"meta":{"line":156,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.log);"],"meta":{"line":170,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.log);"],"meta":{"line":184,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.log);"],"meta":{"line":198,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.log);"],"meta":{"line":212,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.log);"],"meta":{"line":226,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.log);"],"meta":{"line":239,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":250,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":265,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#creationDate","name":"creationDate","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":98,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#creationDate","name":"creationDate","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.log);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.log);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":256,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disable_everyone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"api_request_method","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shard_id","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shard_count","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max_message_cache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_cache_lifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_sweep_interval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetch_all_members","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disable_everyone","description":"Default value for MessageOptions.disable_everyone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"rest_ws_bridge_timeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1474957523591},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":216,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":225,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":245,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":260,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":270,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":282,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `message_cache_lifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":100,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":106,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":112,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":119,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":125,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#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":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]}],"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:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":350,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":356,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":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":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":189,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":225,"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":235,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":277,"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":684,"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":707,"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":732,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.log);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.log);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":8,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":50,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":68,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":96,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":18,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":24,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":30,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":6,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":35,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":53,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":74,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":128,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":93,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":128,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":139,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":154,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":78,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\rclient.user.setStatus('dnd')\r .then(user => console.log('Changed status!'))\r .catch(console.error);","// set game\rclient.user.setStatus(null, 'Cool Game 2042')\r .then(user => console.log('Changed game!'))\r .catch(console.error);"],"meta":{"line":108,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"The status, can be `online`, `idle`, or `dnd`","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"The game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}},{"name":"url","description":"If you want to display as streaming, set this as the URL to the stream (must be a\rtwitch.tv URl)","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#creationDate","name":"creationDate","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":92,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#creationDate","name":"creationDate","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":58,"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":67,"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":80,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":95,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":121,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":84,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":272,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":280,"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":288,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":297,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":311,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.log);"],"meta":{"line":345,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.log);"],"meta":{"line":359,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.log);"],"meta":{"line":401,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.log);"],"meta":{"line":429,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.log);"],"meta":{"line":443,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.log);"],"meta":{"line":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":507,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.log);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.log)"],"meta":{"line":549,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.log);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.log);"],"meta":{"line":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":587,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.log);"],"meta":{"line":601,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.log);"],"meta":{"line":614,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":625,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":662,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":80,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":104,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":110,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":116,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":122,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":128,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":135,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":141,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":147,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":153,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":170,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#creationDate","name":"creationDate","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"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":223,"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":232,"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":242,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":251,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":260,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.log);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.log);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.log);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.log);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":230,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":241,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":260,"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":269,"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":278,"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":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":321,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":330,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":351,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":359,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":367,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":380,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":391,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":95,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":103,"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":112,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":130,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":141,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":150,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":159,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":168,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":205,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":127,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":138,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":102,"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":110,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":119,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":291,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.log);"],"meta":{"line":306,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":325,"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":333,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.log);"],"meta":{"line":347,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.log);"],"meta":{"line":368,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":389,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":418,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":191,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":199,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":207,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":216,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":254,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":262,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":280,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":109,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":130,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":142,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.log);"],"meta":{"line":156,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.log);"],"meta":{"line":170,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.log);"],"meta":{"line":184,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.log);"],"meta":{"line":198,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.log);"],"meta":{"line":212,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.log);"],"meta":{"line":226,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.log);"],"meta":{"line":239,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":250,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":265,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#creationDate","name":"creationDate","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":98,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#creationDate","name":"creationDate","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.log);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.log);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":256,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disable_everyone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"api_request_method","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shard_id","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shard_count","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max_message_cache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_cache_lifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_sweep_interval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetch_all_members","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disable_everyone","description":"Default value for MessageOptions.disable_everyone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"rest_ws_bridge_timeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/sharding/Shard.js b/src/sharding/Shard.js index 21fb1f4ea..05d9dabfa 100644 --- a/src/sharding/Shard.js +++ b/src/sharding/Shard.js @@ -12,19 +12,19 @@ class Shard { */ constructor(manager, id) { /** - * The manager of the spawned shard + * Manager that created the shard * @type {ShardingManager} */ this.manager = manager; /** - * The shard ID + * ID of the shard * @type {number} */ this.id = id; /** - * The process of the shard + * Process of the shard * @type {ChildProcess} */ this.process = childProcess.fork(path.resolve(this.manager.file), [], { @@ -56,34 +56,6 @@ class Shard { }); } - /** - * Evaluates a script on the shard, in the context of the Client. - * @param {string} script JavaScript to run on the shard - * @returns {Promise<*>} Result of the script execution - */ - eval(script) { - if (this._evals.has(script)) return this._evals.get(script); - - const promise = new Promise((resolve, reject) => { - const listener = message => { - if (!message || message._eval !== script) return; - this.process.removeListener('message', listener); - this._evals.delete(script); - if (!message._error) resolve(message._result); else reject(makeError(message._error)); - }; - this.process.on('message', listener); - - this.send({ _eval: script }).catch(err => { - this.process.removeListener('message', listener); - this._evals.delete(script); - reject(err); - }); - }); - - this._evals.set(script, promise); - return promise; - } - /** * Fetches a Client property value of the shard. * @param {string} prop Name of the Client property to get, using periods for nesting @@ -115,6 +87,34 @@ class Shard { this._fetches.set(prop, promise); return promise; } + + /** + * Evaluates a script on the shard, in the context of the Client. + * @param {string} script JavaScript to run on the shard + * @returns {Promise<*>} Result of the script execution + */ + eval(script) { + if (this._evals.has(script)) return this._evals.get(script); + + const promise = new Promise((resolve, reject) => { + const listener = message => { + if (!message || message._eval !== script) return; + this.process.removeListener('message', listener); + this._evals.delete(script); + if (!message._error) resolve(message._result); else reject(makeError(message._error)); + }; + this.process.on('message', listener); + + this.send({ _eval: script }).catch(err => { + this.process.removeListener('message', listener); + this._evals.delete(script); + reject(err); + }); + }); + + this._evals.set(script, promise); + return promise; + } } module.exports = Shard; diff --git a/src/sharding/ShardClientUtil.js b/src/sharding/ShardClientUtil.js index 682968191..ef09bb529 100644 --- a/src/sharding/ShardClientUtil.js +++ b/src/sharding/ShardClientUtil.js @@ -41,27 +41,6 @@ class ShardClientUtil { }); } - /** - * Evaluates a script on all shards, in the context of the Clients. - * @param {string} script JavaScript to run on each shard - * @returns {Promise} Results of the script execution - */ - broadcastEval(script) { - return new Promise((resolve, reject) => { - const listener = message => { - if (!message || message._sEval !== script) return; - process.removeListener('message', listener); - if (!message._error) resolve(message._result); else reject(makeError(message._error)); - }; - process.on('message', listener); - - this.send({ _sEval: script }).catch(err => { - process.removeListener('message', listener); - reject(err); - }); - }); - } - /** * Fetches a Client property value of each shard. * @param {string} prop Name of the Client property to get, using periods for nesting @@ -87,6 +66,27 @@ class ShardClientUtil { }); } + /** + * Evaluates a script on all shards, in the context of the Clients. + * @param {string} script JavaScript to run on each shard + * @returns {Promise} Results of the script execution + */ + broadcastEval(script) { + return new Promise((resolve, reject) => { + const listener = message => { + if (!message || message._sEval !== script) return; + process.removeListener('message', listener); + if (!message._error) resolve(message._result); else reject(makeError(message._error)); + }; + process.on('message', listener); + + this.send({ _sEval: script }).catch(err => { + process.removeListener('message', listener); + reject(err); + }); + }); + } + /** * Handles an IPC message * @param {*} message Message received @@ -94,17 +94,17 @@ class ShardClientUtil { */ _handleMessage(message) { if (!message) return; - if (message._eval) { + if (message._fetchProp) { + const props = message._fetchProp.split('.'); + let value = this.client; + for (const prop of props) value = value[prop]; + this._respond('fetchProp', { _fetchProp: message._fetchProp, _result: value }); + } else if (message._eval) { try { this._respond('eval', { _eval: message._eval, _result: this.client._eval(message._eval) }); } catch (err) { this._respond('eval', { _eval: message._eval, _error: err }); } - } else if (message._fetchProp) { - const props = message._fetchProp.split('.'); - let value = this.client; - for (const prop of props) value = value[prop]; - this._respond('fetchProp', { _fetchProp: message._fetchProp, _result: value }); } } diff --git a/src/sharding/ShardingManager.js b/src/sharding/ShardingManager.js index 6e2524b4d..d288ffe22 100644 --- a/src/sharding/ShardingManager.js +++ b/src/sharding/ShardingManager.js @@ -55,21 +55,21 @@ class ShardingManager extends EventEmitter { this.on('message', (shard, message) => { if (!message) return; - if (message._sEval) { - this.broadcastEval(message._sEval) - .then(results => shard.send({ _sEval: message._sEval, _result: results })) - .catch(err => shard.send({ _sEval: message._sEval, _error: err })); - } else if (message._sFetchProp) { + if (message._sFetchProp) { this.fetchClientValues(message._sFetchProp) .then(results => shard.send({ _sFetchProp: message._sFetchProp, _result: results })) .catch(err => shard.send({ _sFetchProp: message._sFetchProp, _error: err })); + } else if (message._sEval) { + this.broadcastEval(message._sEval) + .then(results => shard.send({ _sEval: message._sEval, _result: results })) + .catch(err => shard.send({ _sEval: message._sEval, _error: err })); } }); } /** * Spawns a single shard. - * @param {number} id The ID of the shard to spawn. THIS IS NOT NEEDED IN ANY NORMAL CASE! + * @param {number} id The ID of the shard to spawn. **This is usually not necessary.** * @returns {Promise} */ createShard(id = this.shards.size) { From 38366f627df4b90f4801734e19b38f07733a8660 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Tue, 27 Sep 2016 02:40:29 -0400 Subject: [PATCH 022/188] Fix transmitting errors through IPC --- src/sharding/ShardClientUtil.js | 3 ++- src/sharding/ShardingManager.js | 5 +++-- src/util/MakeError.js | 3 +-- src/util/MakePlainError.js | 7 +++++++ 4 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 src/util/MakePlainError.js diff --git a/src/sharding/ShardClientUtil.js b/src/sharding/ShardClientUtil.js index ef09bb529..37a58a6f7 100644 --- a/src/sharding/ShardClientUtil.js +++ b/src/sharding/ShardClientUtil.js @@ -1,4 +1,5 @@ const makeError = require('../util/MakeError'); +const makePlainError = require('../util/MakePlainError'); /** * Helper class for sharded clients spawned as a child process, such as from a ShardingManager @@ -103,7 +104,7 @@ class ShardClientUtil { try { this._respond('eval', { _eval: message._eval, _result: this.client._eval(message._eval) }); } catch (err) { - this._respond('eval', { _eval: message._eval, _error: err }); + this._respond('eval', { _eval: message._eval, _error: makePlainError(err) }); } } } diff --git a/src/sharding/ShardingManager.js b/src/sharding/ShardingManager.js index d288ffe22..66f5d0d4d 100644 --- a/src/sharding/ShardingManager.js +++ b/src/sharding/ShardingManager.js @@ -4,6 +4,7 @@ const EventEmitter = require('events').EventEmitter; const Shard = require('./Shard'); const Collection = require('../util/Collection'); +const makePlainError = require('../util/MakePlainError'); /** * This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate @@ -58,11 +59,11 @@ class ShardingManager extends EventEmitter { if (message._sFetchProp) { this.fetchClientValues(message._sFetchProp) .then(results => shard.send({ _sFetchProp: message._sFetchProp, _result: results })) - .catch(err => shard.send({ _sFetchProp: message._sFetchProp, _error: err })); + .catch(err => shard.send({ _sFetchProp: message._sFetchProp, _error: makePlainError(err) })); } else if (message._sEval) { this.broadcastEval(message._sEval) .then(results => shard.send({ _sEval: message._sEval, _result: results })) - .catch(err => shard.send({ _sEval: message._sEval, _error: err })); + .catch(err => shard.send({ _sEval: message._sEval, _error: makePlainError(err) })); } }); } diff --git a/src/util/MakeError.js b/src/util/MakeError.js index 12e8b3203..bbc84dbf8 100644 --- a/src/util/MakeError.js +++ b/src/util/MakeError.js @@ -1,7 +1,6 @@ module.exports = function makeError(obj) { - const err = new Error(obj.message, obj.fileName, obj.lineNumber); + const err = new Error(obj.message); err.name = obj.name; - err.columnNumber = obj.columnNumber; err.stack = obj.stack; return err; }; diff --git a/src/util/MakePlainError.js b/src/util/MakePlainError.js new file mode 100644 index 000000000..b409462b1 --- /dev/null +++ b/src/util/MakePlainError.js @@ -0,0 +1,7 @@ +module.exports = function makePlainError(err) { + const obj = {}; + obj.name = err.name; + obj.message = err.message; + obj.stack = err.stack; + return obj; +}; From 045153584ab8d959c94114e7736cb5d28b483ced Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 27 Sep 2016 17:57:39 +0100 Subject: [PATCH 023/188] redo the client user presence stuff --- docs/docs.json | 2 +- src/client/websocket/WebSocketManager.js | 1 + src/structures/ClientUser.js | 116 ++++++++++++++--------- src/structures/Presence.js | 2 +- test/random.js | 7 ++ 5 files changed, 82 insertions(+), 46 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 64fc5a6c4..40574fceb 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1474957523591},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":216,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":225,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":245,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":260,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":270,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":282,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `message_cache_lifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":100,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":106,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":112,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":119,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":125,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#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":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]}],"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:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":350,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":356,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":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":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":189,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":225,"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":235,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":277,"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":684,"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":707,"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":732,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.log);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.log);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":8,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":50,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":68,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":96,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":18,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":24,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":30,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":6,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":35,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":53,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":74,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":128,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":93,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":128,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":139,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":154,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":78,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\rclient.user.setStatus('dnd')\r .then(user => console.log('Changed status!'))\r .catch(console.error);","// set game\rclient.user.setStatus(null, 'Cool Game 2042')\r .then(user => console.log('Changed game!'))\r .catch(console.error);"],"meta":{"line":108,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"The status, can be `online`, `idle`, or `dnd`","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"The game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}},{"name":"url","description":"If you want to display as streaming, set this as the URL to the stream (must be a\rtwitch.tv URl)","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#creationDate","name":"creationDate","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":92,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#creationDate","name":"creationDate","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":58,"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":67,"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":80,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":95,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":121,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":84,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":272,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":280,"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":288,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":297,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":311,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.log);"],"meta":{"line":345,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.log);"],"meta":{"line":359,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.log);"],"meta":{"line":401,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.log);"],"meta":{"line":429,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.log);"],"meta":{"line":443,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.log);"],"meta":{"line":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":507,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.log);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.log)"],"meta":{"line":549,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.log);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.log);"],"meta":{"line":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":587,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.log);"],"meta":{"line":601,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.log);"],"meta":{"line":614,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":625,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":662,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":80,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":104,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":110,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":116,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":122,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":128,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":135,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":141,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":147,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":153,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":170,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#creationDate","name":"creationDate","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"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":223,"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":232,"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":242,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":251,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":260,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.log);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.log);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.log);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.log);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":230,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":241,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":260,"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":269,"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":278,"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":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":321,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":330,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":351,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":359,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":367,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":380,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":391,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":95,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":103,"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":112,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":130,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":141,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":150,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":159,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":168,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":205,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":127,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":138,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":102,"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":110,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":119,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":291,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.log);"],"meta":{"line":306,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":325,"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":333,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.log);"],"meta":{"line":347,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.log);"],"meta":{"line":368,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":389,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":418,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":191,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":199,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":207,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":216,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":254,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":262,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":280,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":109,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":130,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":142,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.log);"],"meta":{"line":156,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.log);"],"meta":{"line":170,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.log);"],"meta":{"line":184,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.log);"],"meta":{"line":198,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.log);"],"meta":{"line":212,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.log);"],"meta":{"line":226,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.log);"],"meta":{"line":239,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":250,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":265,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#creationDate","name":"creationDate","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":98,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#creationDate","name":"creationDate","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.log);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.log);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":256,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disable_everyone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"api_request_method","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shard_id","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shard_count","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max_message_cache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_cache_lifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_sweep_interval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetch_all_members","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disable_everyone","description":"Default value for MessageOptions.disable_everyone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"rest_ws_bridge_timeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1474995467498},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":216,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":225,"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":245,"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":260,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":270,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":282,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `message_cache_lifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":100,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":106,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":112,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":119,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":125,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#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":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]}],"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:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":350,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":356,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":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":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":190,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":226,"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":236,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":278,"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":684,"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":707,"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":732,"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":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.log);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.log);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":8,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":50,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":68,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":96,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":18,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":24,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":30,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":36,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":54,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":75,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":129,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":19,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":27,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nThe Sharding Manager is still experimental","meta":{"line":15,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":76,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":94,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":129,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":140,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":155,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"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":55,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":79,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#creationDate","name":"creationDate","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"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":92,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#creationDate","name":"creationDate","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":58,"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":67,"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":80,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":95,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":121,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":84,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":272,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":280,"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":288,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":297,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":311,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.log);"],"meta":{"line":345,"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":359,"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":373,"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":387,"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":401,"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":415,"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":429,"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":443,"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":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":507,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log)"],"meta":{"line":549,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.log);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.log);"],"meta":{"line":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":587,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"meta":{"line":601,"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":614,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":625,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":662,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":80,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":104,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":110,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":116,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":122,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":128,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":135,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":141,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":147,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":153,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":170,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#creationDate","name":"creationDate","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"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":223,"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":232,"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":242,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":251,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":260,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":230,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":241,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":260,"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":269,"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":278,"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":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":321,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":330,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":351,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":359,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":367,"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":380,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":391,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":95,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":103,"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":112,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":130,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":141,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":150,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":159,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":168,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":205,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":127,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":138,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":102,"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":110,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":119,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":291,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.log);"],"meta":{"line":306,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":325,"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":333,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"meta":{"line":347,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.log);"],"meta":{"line":368,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":389,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":418,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"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#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":191,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":199,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":207,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":216,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":254,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":262,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":280,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":109,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":130,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":142,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"meta":{"line":156,"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":170,"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":184,"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":198,"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":212,"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":226,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"meta":{"line":239,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":250,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":265,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#creationDate","name":"creationDate","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":98,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","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":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#creationDate","name":"creationDate","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.log);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.log);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#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":256,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disable_everyone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"api_request_method","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shard_id","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shard_count","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max_message_cache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_cache_lifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_sweep_interval","description":"How frequently to remove messages from the cache that are older than\nthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetch_all_members","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disable_everyone","description":"Default value for MessageOptions.disable_everyone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"rest_ws_bridge_timeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index 3cd7d9d2e..1c241a86c 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -112,6 +112,7 @@ class WebSocketManager extends EventEmitter { _send(data) { if (this.ws.readyState === WebSocket.OPEN) { + this.emit('send', data); this.ws.send(data); } } diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index a21367248..4e1de9077 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -19,7 +19,7 @@ class ClientUser extends User { * @type {string} */ this.email = data.email; - + this.localPresence = {}; this._typing = new Map(); } @@ -88,60 +88,88 @@ class ClientUser extends User { } /** - * Set the status and playing game of the logged in client. - * @param {string} [status] The status, can be `online`, `idle`, or `dnd` - * @param {string|Object} [game] The game that is being played - * @param {string} [url] If you want to display as streaming, set this as the URL to the stream (must be a - * twitch.tv URl) - * @returns {Promise} - * @example - * // set status - * client.user.setStatus('dnd') - * .then(user => console.log('Changed status!')) - * .catch(console.error); - * @example - * // set game - * client.user.setStatus(null, 'Cool Game 2042') - * .then(user => console.log('Changed game!')) - * .catch(console.error); + * Set the status of the logged in user. + * @param {string} status can be `online`, `idle`, `invisible` or `dnd` (do not disturb) + * @returns {Promise} */ - setStatus(status, game = null, url = null) { - 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; + setStatus(status) { + return this.setPresence({ status }); + } + + /** + * Set the current game of the logged in user. + * @param {string} game the game being played + * @param {string} [streamingURL] an optional URL to a twitch stream, if one is available. + * @returns {Promise} + */ + setGame(game, streamingURL) { + return this.setPresence({ game: { + name: game, + url: streamingURL, + } }); + } + + /** + * Set/remove the AFK flag for the current user. + * @param {boolean} afk whether or not the user is AFK. + * @returns {Promise} + */ + setAFK(afk) { + return this.setPresence({ afk }); + } + + /** + * Set the full presence of the current user. + * @param {Object} data the data to provide + * @returns {Promise} + */ + setPresence(data) { + // {"op":3,"d":{"status":"dnd","since":0,"game":null,"afk":false}} + return new Promise((resolve, reject) => { + let status = this.localPresence.status || this.presence.status; + let game = this.localPresence.game; + let afk = this.localPresence.afk || this.presence.afk; + + if (!game) { + game = { + name: this.presence.game.name, + type: this.presence.game.type, + url: this.presence.game.url, + }; } - 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; + if (data.status) { + if (typeof data.status !== 'string') { + reject(new TypeError('status must be a string')); + return; + } + status = data.status; } - if (url) { - this.userGame.url = url; - this.userGame.type = 1; + if (data.game) { + game = data.game; + if (game.url) { + game.type = 1; + } } + if (typeof data.afk !== 'undefined') { + afk = data.afk; + } + + afk = Boolean(afk); + + this.localPresence = { status, game, afk }; + + this.localPresence.since = 0; + this.client.ws.send({ op: 3, - d: { - idle_since: this.idleStatus, - game: this.userGame, - }, + d: this.localPresence, }); - this.status = this.idleStatus ? 'idle' : 'online'; - this.game = this.userGame; + this.client._setPresence(this.id, this.localPresence); + resolve(this); }); } diff --git a/src/structures/Presence.js b/src/structures/Presence.js index 3877d0220..27727cfef 100644 --- a/src/structures/Presence.js +++ b/src/structures/Presence.js @@ -7,7 +7,7 @@ class Presence { * The status of the presence: * * * **`online`** - user is online - * * **`offline`** - user is offline + * * **`offline`** - user is offline or invisible * * **`idle`** - user is AFK * * **`dnd`** - user is in Do not Disturb * @type {string} diff --git a/test/random.js b/test/random.js index 724573e29..aa531b3d3 100644 --- a/test/random.js +++ b/test/random.js @@ -10,10 +10,17 @@ const { email, password, token, usertoken } = require('./auth.json'); client.login(token).then(atoken => console.log('logged in with token ' + atoken)).catch(console.log); +client.ws.on('send', console.log); + client.on('ready', () => { console.log('ready!'); }); +client.on('presenceUpdate', (o, n) => { + if (o.username.startsWith('U')) + console.log(o.username, o.presence.status, n.presence.status); +}); + client.on('channelCreate', channel => { console.log(`made ${channel.name}`); }); From 0ee3d6bb8acbd0206b7f4973dbe2f6ab5fb49ee2 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 27 Sep 2016 20:10:42 +0100 Subject: [PATCH 024/188] fix sequences not being reset on new ws sessions --- src/client/websocket/WebSocketManager.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index 1c241a86c..d2c128927 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -179,6 +179,7 @@ class WebSocketManager extends EventEmitter { op: Constants.OPCodes.IDENTIFY, d: payload, }); + this.sequence = -1; } /** From 49d905a7b12a790d7d79fdeda5d15113e3415913 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Tue, 27 Sep 2016 17:22:56 -0400 Subject: [PATCH 025/188] Reorganise some shard logic --- src/client/Client.js | 1 - src/sharding/Shard.js | 30 +++++++++++++++++++++++++++++- src/sharding/ShardClientUtil.js | 1 + src/sharding/ShardingManager.js | 14 -------------- 4 files changed, 30 insertions(+), 16 deletions(-) diff --git a/src/client/Client.js b/src/client/Client.js index 84fa2cadf..a9a44b6de 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -91,7 +91,6 @@ class Client extends EventEmitter { * @type {?ShardUtil} */ this.shard = process.send ? ShardClientUtil.singleton(this) : null; - if (this.shard) process.on('message', this.shard._handleMessage.bind(this.shard)); /** * A Collection of the Client's stored users diff --git a/src/sharding/Shard.js b/src/sharding/Shard.js index 05d9dabfa..1c454d048 100644 --- a/src/sharding/Shard.js +++ b/src/sharding/Shard.js @@ -1,6 +1,7 @@ const childProcess = require('child_process'); const path = require('path'); const makeError = require('../util/MakeError'); +const makePlainError = require('../util/MakePlainError'); /** * Represents a Shard spawned by the ShardingManager. @@ -33,7 +34,7 @@ class Shard { SHARD_COUNT: this.manager.totalShards, }, }); - this.process.on('message', message => { this.manager.emit('message', this, message); }); + this.process.on('message', this._handleMessage.bind(this)); this.process.once('exit', () => { if (this.manager.respawn) this.manager.createShard(this.id); }); @@ -115,6 +116,33 @@ class Shard { this._evals.set(script, promise); return promise; } + + /** + * Handles an IPC message + * @param {*} message Message received + * @private + */ + _handleMessage(message) { + if (message) { + // Shard is requesting a property fetch + if (message._sFetchProp) { + this.manager.fetchClientValues(message._sFetchProp) + .then(results => this.send({ _sFetchProp: message._sFetchProp, _result: results })) + .catch(err => this.send({ _sFetchProp: message._sFetchProp, _error: makePlainError(err) })); + return; + } + + // Shard is requesting an eval broadcast + if (message._sEval) { + this.manager.broadcastEval(message._sEval) + .then(results => this.send({ _sEval: message._sEval, _result: results })) + .catch(err => this.send({ _sEval: message._sEval, _error: makePlainError(err) })); + return; + } + } + + this.manager.emit('message', this, message); + } } module.exports = Shard; diff --git a/src/sharding/ShardClientUtil.js b/src/sharding/ShardClientUtil.js index 37a58a6f7..5485cfa88 100644 --- a/src/sharding/ShardClientUtil.js +++ b/src/sharding/ShardClientUtil.js @@ -10,6 +10,7 @@ class ShardClientUtil { */ constructor(client) { this.client = client; + process.on('message', this._handleMessage.bind(this)); } /** diff --git a/src/sharding/ShardingManager.js b/src/sharding/ShardingManager.js index 66f5d0d4d..da4df2d56 100644 --- a/src/sharding/ShardingManager.js +++ b/src/sharding/ShardingManager.js @@ -4,7 +4,6 @@ const EventEmitter = require('events').EventEmitter; const Shard = require('./Shard'); const Collection = require('../util/Collection'); -const makePlainError = require('../util/MakePlainError'); /** * This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate @@ -53,19 +52,6 @@ class ShardingManager extends EventEmitter { * @type {Collection} */ this.shards = new Collection(); - - this.on('message', (shard, message) => { - if (!message) return; - if (message._sFetchProp) { - this.fetchClientValues(message._sFetchProp) - .then(results => shard.send({ _sFetchProp: message._sFetchProp, _result: results })) - .catch(err => shard.send({ _sFetchProp: message._sFetchProp, _error: makePlainError(err) })); - } else if (message._sEval) { - this.broadcastEval(message._sEval) - .then(results => shard.send({ _sEval: message._sEval, _result: results })) - .catch(err => shard.send({ _sEval: message._sEval, _error: makePlainError(err) })); - } - }); } /** From 4fceae02d6cce8b1b5ec8f1492f120af9a4fff09 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Tue, 27 Sep 2016 17:25:17 -0400 Subject: [PATCH 026/188] Fix ShardClientUtil.fetchClientValues example --- docs/docs.json | 2 +- src/sharding/ShardClientUtil.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 40574fceb..b20dd3c0d 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1474995467498},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":216,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":225,"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":245,"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":260,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":270,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":282,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `message_cache_lifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":100,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":106,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":112,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":119,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":125,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#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":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]}],"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:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":350,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":356,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":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":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":190,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":226,"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":236,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":278,"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":684,"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":707,"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":732,"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":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.log);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.log);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":8,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":50,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":68,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":96,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":18,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":24,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":30,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":36,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":54,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":75,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":129,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":19,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":27,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nThe Sharding Manager is still experimental","meta":{"line":15,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":76,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":94,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":129,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":140,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":155,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"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":55,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":79,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#creationDate","name":"creationDate","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"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":92,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#creationDate","name":"creationDate","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":58,"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":67,"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":80,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":95,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":121,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":84,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":272,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":280,"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":288,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":297,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":311,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.log);"],"meta":{"line":345,"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":359,"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":373,"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":387,"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":401,"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":415,"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":429,"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":443,"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":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":507,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log)"],"meta":{"line":549,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.log);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.log);"],"meta":{"line":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":587,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"meta":{"line":601,"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":614,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":625,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":662,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":80,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":104,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":110,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":116,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":122,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":128,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":135,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":141,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":147,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":153,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":170,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#creationDate","name":"creationDate","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"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":223,"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":232,"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":242,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":251,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":260,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":230,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":241,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":260,"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":269,"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":278,"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":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":321,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":330,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":351,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":359,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":367,"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":380,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":391,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":95,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":103,"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":112,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":130,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":141,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":150,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":159,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":168,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":205,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":127,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":138,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":102,"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":110,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":119,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":291,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.log);"],"meta":{"line":306,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":325,"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":333,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"meta":{"line":347,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.log);"],"meta":{"line":368,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":389,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":418,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"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#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":191,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":199,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":207,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":216,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":254,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":262,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":280,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":109,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":130,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":142,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"meta":{"line":156,"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":170,"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":184,"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":198,"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":212,"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":226,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"meta":{"line":239,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":250,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":265,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#creationDate","name":"creationDate","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":98,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","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":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#creationDate","name":"creationDate","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.log);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.log);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#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":256,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#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":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disable_everyone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"api_request_method","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shard_id","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shard_count","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max_message_cache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_cache_lifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_sweep_interval","description":"How frequently to remove messages from the cache that are older than\nthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetch_all_members","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disable_everyone","description":"Default value for MessageOptions.disable_everyone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"rest_ws_bridge_timeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1475011493697},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":215,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":224,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":244,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":259,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":269,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `message_cache_lifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":349,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":355,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":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":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":227,"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":237,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":279,"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":684,"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":707,"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":732,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.log);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.log);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":37,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":55,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":76,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":130,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":20,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#creationDate","name":"creationDate","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":92,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#creationDate","name":"creationDate","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":58,"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":67,"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":80,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":95,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":121,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":84,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":272,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":280,"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":288,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":297,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":311,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.log);"],"meta":{"line":345,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.log);"],"meta":{"line":359,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.log);"],"meta":{"line":401,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.log);"],"meta":{"line":429,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.log);"],"meta":{"line":443,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.log);"],"meta":{"line":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":507,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.log);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.log)"],"meta":{"line":549,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.log);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.log);"],"meta":{"line":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":587,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.log);"],"meta":{"line":601,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.log);"],"meta":{"line":614,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":625,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":662,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":80,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":104,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":110,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":116,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":122,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":128,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":135,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":141,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":147,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":153,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":170,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#creationDate","name":"creationDate","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"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":223,"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":232,"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":242,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":251,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":260,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.log);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.log);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.log);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.log);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":230,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":241,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":260,"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":269,"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":278,"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":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":321,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":330,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":351,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":359,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":367,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":380,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":391,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":95,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":103,"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":112,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":130,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":141,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":150,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":159,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":168,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":205,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":127,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":138,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":102,"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":110,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":119,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":291,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.log);"],"meta":{"line":306,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":325,"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":333,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.log);"],"meta":{"line":347,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.log);"],"meta":{"line":368,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":389,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":418,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":191,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":199,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":207,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":216,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":254,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":262,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":280,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":109,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":130,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":142,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.log);"],"meta":{"line":156,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.log);"],"meta":{"line":170,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.log);"],"meta":{"line":184,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.log);"],"meta":{"line":198,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.log);"],"meta":{"line":212,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.log);"],"meta":{"line":226,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.log);"],"meta":{"line":239,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":250,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":265,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#creationDate","name":"creationDate","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":98,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#creationDate","name":"creationDate","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.log);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.log);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":256,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disable_everyone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"api_request_method","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shard_id","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shard_count","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max_message_cache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_cache_lifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_sweep_interval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetch_all_members","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disable_everyone","description":"Default value for MessageOptions.disable_everyone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"rest_ws_bridge_timeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/sharding/ShardClientUtil.js b/src/sharding/ShardClientUtil.js index 5485cfa88..c3640f8c7 100644 --- a/src/sharding/ShardClientUtil.js +++ b/src/sharding/ShardClientUtil.js @@ -48,7 +48,7 @@ class ShardClientUtil { * @param {string} prop Name of the Client property to get, using periods for nesting * @returns {Promise} * @example - * manager.fetchClientValues('guilds.size').then(results => { + * client.shard.fetchClientValues('guilds.size').then(results => { * console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`); * }).catch(console.error); */ From ba8dd3467a174cc7e00a2c2aa16a05f2b838ae61 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Tue, 27 Sep 2016 18:42:32 -0400 Subject: [PATCH 027/188] Switch config back to camelCase --- docs/docs.json | 2 +- src/client/Client.js | 18 ++++---- src/client/ClientDataManager.js | 2 +- src/client/actions/ChannelDelete.js | 2 +- src/client/actions/GuildDelete.js | 2 +- src/client/actions/GuildMemberRemove.js | 2 +- src/client/actions/GuildRoleDelete.js | 2 +- src/client/actions/MessageDelete.js | 2 +- src/client/rest/RESTManager.js | 2 +- src/client/rest/RESTMethods.js | 6 +-- src/client/websocket/WebSocketManager.js | 6 +-- src/sharding/ShardClientUtil.js | 4 +- src/structures/interface/TextBasedChannel.js | 4 +- src/util/Constants.js | 44 ++++++++++---------- 14 files changed, 49 insertions(+), 49 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index b20dd3c0d..81c30376b 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1475011493697},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":215,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":224,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":244,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":259,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":269,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `message_cache_lifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":349,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":355,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":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":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":227,"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":237,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":279,"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":684,"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":707,"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":732,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.log);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.log);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":37,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":55,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":76,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":130,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":20,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#creationDate","name":"creationDate","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":92,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#creationDate","name":"creationDate","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":58,"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":67,"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":80,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":95,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":121,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":84,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":272,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":280,"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":288,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":297,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":311,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.log);"],"meta":{"line":345,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.log);"],"meta":{"line":359,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.log);"],"meta":{"line":401,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.log);"],"meta":{"line":429,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.log);"],"meta":{"line":443,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.log);"],"meta":{"line":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":507,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.log);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.log)"],"meta":{"line":549,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.log);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.log);"],"meta":{"line":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":587,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.log);"],"meta":{"line":601,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.log);"],"meta":{"line":614,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":625,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":662,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":80,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":104,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":110,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":116,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":122,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":128,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":135,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":141,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":147,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":153,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":170,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#creationDate","name":"creationDate","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"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":223,"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":232,"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":242,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":251,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":260,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.log);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.log);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.log);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.log);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":230,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":241,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":260,"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":269,"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":278,"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":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":321,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":330,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":351,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":359,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":367,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":380,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":391,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":95,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":103,"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":112,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":130,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":141,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":150,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":159,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":168,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":205,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":127,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":138,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":102,"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":110,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":119,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":291,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.log);"],"meta":{"line":306,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":325,"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":333,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.log);"],"meta":{"line":347,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.log);"],"meta":{"line":368,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":389,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":418,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":191,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":199,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":207,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":216,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":254,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":262,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":280,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":109,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":130,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":142,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.log);"],"meta":{"line":156,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.log);"],"meta":{"line":170,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.log);"],"meta":{"line":184,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.log);"],"meta":{"line":198,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.log);"],"meta":{"line":212,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.log);"],"meta":{"line":226,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.log);"],"meta":{"line":239,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":250,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":265,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#creationDate","name":"creationDate","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":98,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#creationDate","name":"creationDate","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.log);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.log);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":256,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disable_everyone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"api_request_method","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shard_id","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shard_count","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max_message_cache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_cache_lifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"message_sweep_interval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetch_all_members","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disable_everyone","description":"Default value for MessageOptions.disable_everyone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"rest_ws_bridge_timeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1475016131285},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":215,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":224,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":244,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":259,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":269,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":349,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":355,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":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":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":227,"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":237,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":279,"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":684,"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":707,"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":732,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.log);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.log);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":37,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":55,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":76,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":130,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":20,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#creationDate","name":"creationDate","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":92,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#creationDate","name":"creationDate","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":58,"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":67,"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":80,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":95,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":121,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":84,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":272,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":280,"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":288,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":297,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":311,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.log);"],"meta":{"line":345,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.log);"],"meta":{"line":359,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.log);"],"meta":{"line":401,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.log);"],"meta":{"line":429,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.log);"],"meta":{"line":443,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.log);"],"meta":{"line":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":507,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.log);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.log)"],"meta":{"line":549,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.log);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.log);"],"meta":{"line":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":587,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.log);"],"meta":{"line":601,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.log);"],"meta":{"line":614,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":625,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":662,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":80,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":104,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":110,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":116,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":122,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":128,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":135,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":141,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":147,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":153,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":170,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#creationDate","name":"creationDate","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"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":223,"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":232,"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":242,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":251,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":260,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.log);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.log);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.log);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.log);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":230,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":241,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":260,"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":269,"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":278,"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":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":321,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":330,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":351,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":359,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":367,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":380,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":391,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":95,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":103,"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":112,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":130,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":141,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":150,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":159,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":168,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":205,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":127,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":138,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":102,"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":110,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":119,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":291,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.log);"],"meta":{"line":306,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":325,"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":333,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.log);"],"meta":{"line":347,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.log);"],"meta":{"line":368,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":389,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":418,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":191,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":199,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":207,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":216,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":254,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":262,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":280,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":109,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":130,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":142,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.log);"],"meta":{"line":156,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.log);"],"meta":{"line":170,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.log);"],"meta":{"line":184,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.log);"],"meta":{"line":198,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.log);"],"meta":{"line":212,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.log);"],"meta":{"line":226,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.log);"],"meta":{"line":239,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":250,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":265,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#creationDate","name":"creationDate","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":98,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#creationDate","name":"creationDate","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.log);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.log);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":256,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/client/Client.js b/src/client/Client.js index a9a44b6de..88b276d0f 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -29,12 +29,12 @@ class Client extends EventEmitter { */ this.options = mergeDefault(Constants.DefaultOptions, options); - if (!this.options.shard_id && 'SHARD_ID' in process.env) { - this.options.shard_id = Number(process.env.SHARD_ID); + if (!this.options.shardId && 'SHARD_ID' in process.env) { + this.options.shardId = Number(process.env.SHARD_ID); } - if (!this.options.shard_count && 'SHARD_COUNT' in process.env) { - this.options.shard_count = Number(process.env.SHARD_COUNT); + if (!this.options.shardCount && 'SHARD_COUNT' in process.env) { + this.options.shardCount = Number(process.env.SHARD_COUNT); } /** @@ -150,8 +150,8 @@ class Client extends EventEmitter { this._timeouts = new Set(); this._intervals = new Set(); - if (this.options.message_sweep_interval > 0) { - this.setInterval(this.sweepMessages.bind(this), this.options.message_sweep_interval * 1000); + if (this.options.messageSweepInterval > 0) { + this.setInterval(this.sweepMessages.bind(this), this.options.messageSweepInterval * 1000); } } @@ -273,12 +273,12 @@ class Client extends EventEmitter { /** * Sweeps all channels' messages and removes the ones older than the max message lifetime. * If the message has been edited, the time of the edit is used rather than the time of the original message. - * @param {number} [lifetime=this.options.message_cache_lifetime] Messages that are older than this (in seconds) - * will be removed from the caches. The default is based on the client's `message_cache_lifetime` option. + * @param {number} [lifetime=this.options.messageCacheLifetime] Messages that are older than this (in seconds) + * will be removed from the caches. The default is based on the client's `messageCacheLifetime` option. * @returns {number} Amount of messages that were removed from the caches, * or -1 if the message cache lifetime is unlimited */ - sweepMessages(lifetime = this.options.message_cache_lifetime) { + sweepMessages(lifetime = this.options.messageCacheLifetime) { if (typeof lifetime !== 'number' || isNaN(lifetime)) throw new TypeError('Lifetime must be a number.'); if (lifetime <= 0) { this.emit('debug', 'Didn\'t sweep messages - lifetime is unlimited'); diff --git a/src/client/ClientDataManager.js b/src/client/ClientDataManager.js index 44b1a22e3..fb8f27c1e 100644 --- a/src/client/ClientDataManager.js +++ b/src/client/ClientDataManager.js @@ -27,7 +27,7 @@ class ClientDataManager { * @event Client#guildCreate * @param {Guild} guild The created guild */ - if (this.client.options.fetch_all_members) { + if (this.client.options.fetchAllMembers) { guild.fetchMembers().then(() => { this.client.emit(Constants.Events.GUILD_CREATE, guild); }); } else { this.client.emit(Constants.Events.GUILD_CREATE, guild); diff --git a/src/client/actions/ChannelDelete.js b/src/client/actions/ChannelDelete.js index b54783bcc..7b847efce 100644 --- a/src/client/actions/ChannelDelete.js +++ b/src/client/actions/ChannelDelete.js @@ -24,7 +24,7 @@ class ChannelDeleteAction extends Action { } scheduleForDeletion(id) { - this.client.setTimeout(() => this.deleted.delete(id), this.client.options.rest_ws_bridge_timeout); + this.client.setTimeout(() => this.deleted.delete(id), this.client.options.restWsBridgeTimeout); } } diff --git a/src/client/actions/GuildDelete.js b/src/client/actions/GuildDelete.js index a8a6a3bbf..12142633f 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(() => this.deleted.delete(id), this.client.options.rest_ws_bridge_timeout); + this.client.setTimeout(() => this.deleted.delete(id), this.client.options.restWsBridgeTimeout); } } diff --git a/src/client/actions/GuildMemberRemove.js b/src/client/actions/GuildMemberRemove.js index 7b21db16a..88221174f 100644 --- a/src/client/actions/GuildMemberRemove.js +++ b/src/client/actions/GuildMemberRemove.js @@ -36,7 +36,7 @@ class GuildMemberRemoveAction extends Action { } scheduleForDeletion(guildID, userID) { - this.client.setTimeout(() => this.deleted.delete(guildID + userID), this.client.options.rest_ws_bridge_timeout); + this.client.setTimeout(() => this.deleted.delete(guildID + userID), this.client.options.restWsBridgeTimeout); } } diff --git a/src/client/actions/GuildRoleDelete.js b/src/client/actions/GuildRoleDelete.js index fe4edcceb..a55c7356a 100644 --- a/src/client/actions/GuildRoleDelete.js +++ b/src/client/actions/GuildRoleDelete.js @@ -33,7 +33,7 @@ class GuildRoleDeleteAction extends Action { } scheduleForDeletion(guildID, roleID) { - this.client.setTimeout(() => this.deleted.delete(guildID + roleID), this.client.options.rest_ws_bridge_timeout); + this.client.setTimeout(() => this.deleted.delete(guildID + roleID), this.client.options.restWsBridgeTimeout); } } diff --git a/src/client/actions/MessageDelete.js b/src/client/actions/MessageDelete.js index 5618efacb..beb805097 100644 --- a/src/client/actions/MessageDelete.js +++ b/src/client/actions/MessageDelete.js @@ -33,7 +33,7 @@ class MessageDeleteAction extends Action { scheduleForDeletion(channelID, messageID) { this.client.setTimeout(() => this.deleted.delete(channelID + messageID), - this.client.options.rest_ws_bridge_timeout); + this.client.options.restWsBridgeTimeout); } } diff --git a/src/client/rest/RESTManager.js b/src/client/rest/RESTManager.js index 03a7158de..ac1ce6e99 100644 --- a/src/client/rest/RESTManager.js +++ b/src/client/rest/RESTManager.js @@ -26,7 +26,7 @@ class RESTManager { } getRequestHandler() { - switch (this.client.options.api_request_method) { + switch (this.client.options.apiRequestMethod) { case 'sequential': return SequentialRequestHandler; case 'burst': diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 12625f4b4..736211f48 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -41,18 +41,18 @@ class RESTMethods { return new Promise((resolve, reject) => { this.rest.makeRequest('get', Constants.Endpoints.gateway, true) .then(res => { - this.rest.client.ws.gateway = `${res.url}/?encoding=json&v=${this.rest.client.options.protocol_version}`; + this.rest.client.ws.gateway = `${res.url}/?encoding=json&v=${this.rest.client.options.protocolVersion}`; resolve(this.rest.client.ws.gateway); }) .catch(reject); }); } - sendMessage(channel, content, { tts, nonce, disable_everyone, split } = {}, file = null) { + sendMessage(channel, content, { tts, nonce, disableEveryone, split } = {}, file = null) { return new Promise((resolve, reject) => { if (typeof content !== 'undefined') content = this.rest.client.resolver.resolveString(content); - if (disable_everyone || (typeof disable_everyone === 'undefined' && this.rest.client.options.disable_everyone)) { + if (disableEveryone || (typeof disableEveryone === 'undefined' && this.rest.client.options.disableEveryone)) { content = content.replace('@everyone', '@\u200beveryone').replace('@here', '@\u200bhere'); } diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index d2c128927..16c61e90e 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -171,8 +171,8 @@ class WebSocketManager extends EventEmitter { this.reconnecting = false; const payload = this.client.options.ws; payload.token = this.client.token; - if (this.client.options.shard_count > 0) { - payload.shard = [Number(this.client.options.shard_id), Number(this.client.options.shard_count)]; + if (this.client.options.shardCount > 0) { + payload.shard = [Number(this.client.options.shardId), Number(this.client.options.shardCount)]; } this.client.emit('debug', 'Identifying as new session'); this.send({ @@ -256,7 +256,7 @@ class WebSocketManager extends EventEmitter { } if (unavailableCount === 0) { this.status = Constants.Status.NEARLY; - if (this.client.options.fetch_all_members) { + if (this.client.options.fetchAllMembers) { const promises = this.client.guilds.array().map(g => g.fetchMembers()); Promise.all(promises).then(() => this._emitReady()).catch(e => { this.client.emit(Constants.Event.WARN, `Error on pre-ready guild member fetching - ${e}`); diff --git a/src/sharding/ShardClientUtil.js b/src/sharding/ShardClientUtil.js index c3640f8c7..c8012caaa 100644 --- a/src/sharding/ShardClientUtil.js +++ b/src/sharding/ShardClientUtil.js @@ -18,7 +18,7 @@ class ShardClientUtil { * @type {number} */ get id() { - return this.client.options.shard_id; + return this.client.options.shardId; } /** @@ -26,7 +26,7 @@ class ShardClientUtil { * @type {number} */ get count() { - return this.client.options.shard_count; + return this.client.options.shardCount; } /** diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index f1194c34e..c5eb09c01 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -27,7 +27,7 @@ class TextBasedChannel { * @typedef {Object} MessageOptions * @property {boolean} [tts=false] Whether or not the message should be spoken aloud * @property {string} [nonce=''] The nonce for the message - * @property {boolean} [disable_everyone=this.client.options.disable_everyone] Whether or not @everyone and @here + * @property {boolean} [disableEveryone=this.client.options.disableEveryone] Whether or not @everyone and @here * should be replaced with plain-text * @property {boolean|SplitOptions} [split=false] Whether or not the message should be split into multiple messages if * it exceeds the character limit. If an object is provided, these are the options for splitting the message. @@ -320,7 +320,7 @@ class TextBasedChannel { } _cacheMessage(message) { - const maxSize = this.client.options.max_message_cache; + const maxSize = this.client.options.maxMessageCache; if (maxSize === 0) return null; if (this.messages.size >= maxSize) this.messages.delete(this.messages.keys().next().value); diff --git a/src/util/Constants.js b/src/util/Constants.js index 033c3c4e6..b11592822 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -1,35 +1,35 @@ /** * Options for a Client. * @typedef {Object} ClientOptions - * @property {string} [api_request_method='sequential'] 'sequential' or 'burst'. Sequential executes all requests in + * @property {string} [apiRequestMethod='sequential'] 'sequential' or 'burst'. Sequential executes all requests in * the order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order. - * @property {number} [shard_id=0] The ID of this shard - * @property {number} [shard_count=0] The number of shards - * @property {number} [max_message_cache=200] Number of messages to cache per channel - * @property {number} [message_cache_lifetime=0] How long until a message should be uncached by the message sweeping + * @property {number} [shardId=0] The ID of this shard + * @property {number} [shardCount=0] The number of shards + * @property {number} [maxMessageCache=200] Number of messages to cache per channel + * @property {number} [messageCacheLifetime=0] How long until a message should be uncached by the message sweeping * (in seconds, 0 for forever) - * @property {number} [message_sweep_interval=0] How frequently to remove messages from the cache that are older than + * @property {number} [messageSweepInterval=0] How frequently to remove messages from the cache that are older than * the max message lifetime (in seconds, 0 for never) - * @property {boolean} [fetch_all_members=false] Whether to cache all guild members and users upon startup - * @property {boolean} [disable_everyone=false] Default value for MessageOptions.disable_everyone - * @property {number} [rest_ws_bridge_timeout=5000] Maximum time permitted between REST responses and their + * @property {boolean} [fetchAllMembers=false] Whether to cache all guild members and users upon startup + * @property {boolean} [disableEveryone=false] Default value for MessageOptions.disableEveryone + * @property {number} [restWsBridgeTimeout=5000] Maximum time permitted between REST responses and their * corresponding websocket events * @property {WebsocketOptions} [ws] Options for the websocket */ exports.DefaultOptions = { - api_request_method: 'sequential', - shard_id: 0, - shard_count: 0, - max_message_cache: 200, - message_cache_lifetime: 0, - message_sweep_interval: 0, - fetch_all_members: false, - disable_everyone: false, - rest_ws_bridge_timeout: 5000, - protocol_version: 6, + apiRequestMethod: 'sequential', + shardId: 0, + shardCount: 0, + maxMessageCache: 200, + messageCacheLifetime: 0, + messageSweepInterval: 0, + fetchAllMembers: false, + disableEveryone: false, + restWsBridgeTimeout: 5000, + protocolVersion: 6, /** - * Websocket options. + * Websocket options. These are left as snake_case to match the API. * @typedef {Object} WebsocketOptions * @property {number} [large_threshold=250] Number of members in a guild to be considered large * @property {boolean} [compress=true] Whether to compress data sent on the connection @@ -72,10 +72,10 @@ exports.Errors = { NOT_A_PERMISSION: 'Invalid permission string or number.', INVALID_RATE_LIMIT_METHOD: 'Unknown rate limiting method.', BAD_LOGIN: 'Incorrect login details were provided.', - INVALID_SHARD: 'Invalid shard settings were provided', + INVALID_SHARD: 'Invalid shard settings were provided.', }; -const API = `https://discordapp.com/api/v${exports.DefaultOptions.protocol_version}`; +const API = `https://discordapp.com/api/v${exports.DefaultOptions.protocolVersion}`; const Endpoints = exports.Endpoints = { // general endpoints From 8d18ed42f6bc49d8282f2fb4bd8b0b86c69b47ea Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Tue, 27 Sep 2016 18:48:54 -0400 Subject: [PATCH 028/188] Update tests --- test/random.js | 22 +++++++++++----------- test/shard.js | 10 +++++----- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/test/random.js b/test/random.js index aa531b3d3..bb003adc9 100644 --- a/test/random.js +++ b/test/random.js @@ -4,11 +4,11 @@ const Discord = require('../'); const request = require('superagent'); const fs = require('fs'); -const client = new Discord.Client({ fetch_all_members: false, api_request_method: 'sequential' }); +const client = new Discord.Client({ fetchAllMembers: false, apiRequestMethod: 'sequential' }); const { email, password, token, usertoken } = require('./auth.json'); -client.login(token).then(atoken => console.log('logged in with token ' + atoken)).catch(console.log); +client.login(token).then(atoken => console.log('logged in with token ' + atoken)).catch(console.error); client.ws.on('send', console.log); @@ -58,7 +58,7 @@ client.on('message', message => { request .get('url') .end((err, res) => { - client.user.setAvatar(res.body).catch(console.log) + client.user.setAvatar(res.body).catch(console.error) .then(user => message.channel.sendMessage('Done!')); }); } @@ -66,11 +66,11 @@ 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); + .catch(console.error); } if (message.content === 'leave') { - message.guild.leave().then(guild => console.log('left guild', guild.name)).catch(console.log); + message.guild.leave().then(guild => console.log('left guild', guild.name)).catch(console.error); } if (message.content === 'stats') { @@ -80,7 +80,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).then(msg => msg.edit('nah')).catch(console.log); + message.channel.sendMessage(m).then(msg => msg.edit('nah')).catch(console.error); } if (message.content === 'messageme!') { @@ -95,7 +95,7 @@ client.on('message', message => { message.guild.member(message.mentions[0]).kick().then(member => { console.log(member); message.channel.sendMessage('Kicked!' + member.user.username); - }).catch(console.log); + }).catch(console.error); } if (message.content === 'ratelimittest') { @@ -109,17 +109,17 @@ client.on('message', message => { if (message.content === 'makerole') { message.guild.createRole().then(role => { message.channel.sendMessage(`Made role ${role.name}`); - }).catch(console.log); + }).catch(console.error); } } }); function nameLoop(user) { - // user.setUsername(user.username + 'a').then(nameLoop).catch(console.log); + // user.setUsername(user.username + 'a').then(nameLoop).catch(console.error); } function chanLoop(channel) { - channel.setName(channel.name + 'a').then(chanLoop).catch(console.log); + channel.setName(channel.name + 'a').then(chanLoop).catch(console.error); } client.on('message', msg => { @@ -157,6 +157,6 @@ client.on('message', msg => { conn.player.on('error', err => console.log(123, err)); disp.on('error', err => console.log(123, err)); }) - .catch(console.log); + .catch(console.error); } }) diff --git a/test/shard.js b/test/shard.js index ca05fe773..6021a18c9 100644 --- a/test/shard.js +++ b/test/shard.js @@ -2,8 +2,8 @@ const Discord = require('../'); const { token } = require('./auth.json'); const client = new Discord.Client({ - shard_id: process.argv[2], - shard_count: process.argv[3], + shardId: process.argv[2], + shardCount: process.argv[3], }); client.on('message', msg => { @@ -20,12 +20,12 @@ client.on('message', msg => { process.send(123); client.on('ready', () => { - console.log('Ready', client.options.shard_id); - if (client.options.shard_id === '0') + console.log('Ready', client.options.shardId); + if (client.options.shardId === 0) setTimeout(() => { console.log('kek dying'); client.destroy(); }, 5000); }); -client.login(token).catch(console.log); +client.login(token).catch(console.error); From b6c26cc2ae90e495f51f5901829ad38ac47b524e Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Tue, 27 Sep 2016 18:50:01 -0400 Subject: [PATCH 029/188] Replace console.log in catches with console.error --- docs/docs.json | 2 +- src/client/voice/VoiceConnection.js | 4 +-- src/structures/Channel.js | 2 +- src/structures/Guild.js | 32 ++++++++++---------- src/structures/GuildChannel.js | 8 ++--- src/structures/Message.js | 6 ++-- src/structures/Role.js | 14 ++++----- src/structures/VoiceChannel.js | 4 +-- src/structures/interface/TextBasedChannel.js | 6 ++-- 9 files changed, 39 insertions(+), 39 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 81c30376b..191cd590c 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1475016131285},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":215,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":224,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":244,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":259,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":269,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":349,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":355,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":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":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":227,"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":237,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":279,"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":684,"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":707,"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":732,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.log);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.log);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":37,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":55,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":76,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":130,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":20,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#creationDate","name":"creationDate","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":92,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#creationDate","name":"creationDate","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":58,"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":67,"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":80,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":95,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":121,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":84,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":272,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":280,"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":288,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":297,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":311,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.log);"],"meta":{"line":345,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.log);"],"meta":{"line":359,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.log);"],"meta":{"line":401,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.log);"],"meta":{"line":429,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.log);"],"meta":{"line":443,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.log);"],"meta":{"line":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":507,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.log);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.log)"],"meta":{"line":549,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.log);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.log);"],"meta":{"line":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":587,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.log);"],"meta":{"line":601,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.log);"],"meta":{"line":614,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":625,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":662,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":80,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":104,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":110,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":116,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":122,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":128,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":135,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":141,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":147,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":153,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":170,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#creationDate","name":"creationDate","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"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":223,"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":232,"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":242,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":251,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":260,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.log);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.log);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.log);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.log);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":230,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":241,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":260,"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":269,"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":278,"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":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":321,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":330,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":351,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":359,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":367,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":380,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":391,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":95,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":103,"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":112,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":130,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":141,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":150,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":159,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":168,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":205,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":127,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":138,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":102,"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":110,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":119,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":291,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.log);"],"meta":{"line":306,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":325,"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":333,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.log);"],"meta":{"line":347,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.log);"],"meta":{"line":368,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":389,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":418,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":191,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":199,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":207,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":216,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":254,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":262,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":280,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":109,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":130,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":142,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.log);"],"meta":{"line":156,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.log);"],"meta":{"line":170,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.log);"],"meta":{"line":184,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.log);"],"meta":{"line":198,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.log);"],"meta":{"line":212,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.log);"],"meta":{"line":226,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.log);"],"meta":{"line":239,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":250,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":265,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#creationDate","name":"creationDate","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":98,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#creationDate","name":"creationDate","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.log);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.log);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":256,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.log);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.log);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1475016584426},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":215,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":224,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":244,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":259,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":269,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":349,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":355,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":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":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":227,"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":237,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":279,"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":684,"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":707,"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":732,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":37,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":55,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":76,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":130,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":20,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#creationDate","name":"creationDate","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":92,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#creationDate","name":"creationDate","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":58,"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":67,"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":80,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":95,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":121,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":84,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":272,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":280,"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":288,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":297,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":311,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":345,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":359,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":401,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":429,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":443,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":507,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":549,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":587,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":601,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":614,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":625,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":662,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":80,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":104,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":110,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":116,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":122,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":128,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":135,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":141,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":147,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":153,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":170,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#creationDate","name":"creationDate","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"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":223,"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":232,"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":242,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":251,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":260,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":230,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":241,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":260,"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":269,"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":278,"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":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":321,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":330,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":351,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":359,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":367,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":380,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":391,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":95,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":103,"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":112,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":130,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":141,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":150,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":159,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":168,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":205,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":127,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":138,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":102,"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":110,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":119,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":291,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":306,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":325,"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":333,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":347,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":368,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":389,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":418,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":191,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":199,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":207,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":216,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":254,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":262,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":280,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":109,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":130,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":142,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":156,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":170,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":184,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":198,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":212,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":226,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":239,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":250,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":265,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#creationDate","name":"creationDate","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":98,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#creationDate","name":"creationDate","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":256,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index 73f9b9d87..bde83f060 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -230,7 +230,7 @@ class VoiceConnection extends EventEmitter { * .then(connection => { * const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3'); * }) - * .catch(console.log); + * .catch(console.error); */ playFile(file, { seek = 0, volume = 1, passes = 1 } = {}) { const options = { seek, volume, passes }; @@ -251,7 +251,7 @@ class VoiceConnection extends EventEmitter { * const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'}); * const dispatcher = connection.playStream(stream, streamOptions); * }) - * .catch(console.log); + * .catch(console.error); */ playStream(stream, { seek = 0, volume = 1, passes = 1 } = {}) { const options = { seek, volume, passes }; diff --git a/src/structures/Channel.js b/src/structures/Channel.js index e29e75d69..e37c21193 100644 --- a/src/structures/Channel.js +++ b/src/structures/Channel.js @@ -47,7 +47,7 @@ class Channel { * // delete the channel * channel.delete() * .then() // success - * .catch(console.log); // log error + * .catch(console.error); // log error */ delete() { return this.client.rest.methods.deleteChannel(this); diff --git a/src/structures/Guild.js b/src/structures/Guild.js index d4e6a2ef0..12060b215 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -340,7 +340,7 @@ class Guild { * region: 'london', * }) * .then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`)) - * .catch(console.log); + * .catch(console.error); */ edit(data) { return this.client.rest.methods.updateGuild(this, data); @@ -354,7 +354,7 @@ class Guild { * // edit the guild name * guild.setName('Discord Guild') * .then(updated => console.log(`Updated guild name to ${guild.name}`)) - * .catch(console.log); + * .catch(console.error); */ setName(name) { return this.edit({ name }); @@ -368,7 +368,7 @@ class Guild { * // edit the guild region * guild.setRegion('london') * .then(updated => console.log(`Updated guild region to ${guild.region}`)) - * .catch(console.log); + * .catch(console.error); */ setRegion(region) { return this.edit({ region }); @@ -382,7 +382,7 @@ class Guild { * // edit the guild verification level * guild.setVerificationLevel(1) * .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`)) - * .catch(console.log); + * .catch(console.error); */ setVerificationLevel(verificationLevel) { return this.edit({ verificationLevel }); @@ -396,7 +396,7 @@ class Guild { * // edit the guild AFK channel * guild.setAFKChannel(channel) * .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`)) - * .catch(console.log); + * .catch(console.error); */ setAFKChannel(afkChannel) { return this.edit({ afkChannel }); @@ -410,7 +410,7 @@ class Guild { * // edit the guild AFK channel * guild.setAFKTimeout(60) * .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`)) - * .catch(console.log); + * .catch(console.error); */ setAFKTimeout(afkTimeout) { return this.edit({ afkTimeout }); @@ -424,7 +424,7 @@ class Guild { * // edit the guild icon * guild.setIcon(fs.readFileSync('./icon.png')) * .then(updated => console.log('Updated the guild icon')) - * .catch(console.log); + * .catch(console.error); */ setIcon(icon) { return this.edit({ icon }); @@ -438,7 +438,7 @@ class Guild { * // edit the guild owner * guild.setOwner(guilds.members[0]) * .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`)) - * .catch(console.log); + * .catch(console.error); */ setOwner(owner) { return this.edit({ owner }); @@ -452,7 +452,7 @@ class Guild { * // edit the guild splash * guild.setIcon(fs.readFileSync('./splash.png')) * .then(updated => console.log('Updated the guild splash')) - * .catch(console.log); + * .catch(console.error); */ setSplash(splash) { return this.edit({ splash }); @@ -525,7 +525,7 @@ class Guild { * // create a new text channel * guild.createChannel('new-general', 'text') * .then(channel => console.log(`Created new channel ${channel}`)) - * .catch(console.log); + * .catch(console.error); */ createChannel(name, type) { return this.client.rest.methods.createChannel(this, name, type); @@ -539,12 +539,12 @@ class Guild { * // create a new role * guild.createRole() * .then(role => console.log(`Created role ${role}`)) - * .catch(console.log); + * .catch(console.error); * @example * // create a new role with data * guild.createRole({ name: 'Super Cool People' }) * .then(role => console.log(`Created role ${role}`)) - * .catch(console.log) + * .catch(console.error) */ createRole(data) { const create = this.client.rest.methods.createGuildRole(this); @@ -561,12 +561,12 @@ class Guild { * // create a new emoji from a url * guild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip') * .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`)) - * .catch(console.log); + * .catch(console.error); * @example * // create a new emoji from a file on your computer * guild.createEmoji('./memes/banana.png', 'banana') * .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`)) - * .catch(console.log); + * .catch(console.error); */ createEmoji(attachment, name) { return new Promise((resolve, reject) => { @@ -596,7 +596,7 @@ class Guild { * // leave a guild * guild.leave() * .then(g => console.log(`Left the guild ${g}`)) - * .catch(console.log); + * .catch(console.error); */ leave() { return this.client.rest.methods.leaveGuild(this); @@ -609,7 +609,7 @@ class Guild { * // delete a guild * guild.delete() * .then(g => console.log(`Deleted the guild ${g}`)) - * .catch(console.log); + * .catch(console.error); */ delete() { return this.client.rest.methods.deleteGuild(this); diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index 434279025..417500d9c 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -120,7 +120,7 @@ class GuildChannel extends Channel { * SEND_MESSAGES: false * }) * .then(() => console.log('Done!')) - * .catch(console.log); + * .catch(console.error); */ overwritePermissions(userOrRole, options) { const payload = { @@ -170,7 +170,7 @@ class GuildChannel extends Channel { * // set a new channel name * channel.setName('not_general') * .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`)) - * .catch(console.log); + * .catch(console.error); */ setName(name) { return this.client.rest.methods.updateChannel(this, { name }); @@ -184,7 +184,7 @@ class GuildChannel extends Channel { * // set a new channel position * channel.setPosition(2) * .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`)) - * .catch(console.log); + * .catch(console.error); */ setPosition(position) { return this.client.rest.methods.updateChannel(this, { position }); @@ -198,7 +198,7 @@ class GuildChannel extends Channel { * // 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); + * .catch(console.error); */ setTopic(topic) { return this.client.rest.methods.updateChannel(this, { topic }); diff --git a/src/structures/Message.js b/src/structures/Message.js index 19254502b..ccb56f673 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -301,7 +301,7 @@ class Message { * // 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); + * .catch(console.error); */ edit(content) { return this.client.rest.methods.updateMessage(this, content); @@ -342,7 +342,7 @@ class Message { * // delete a message * message.delete() * .then(msg => console.log(`Deleted message from ${msg.author}`)) - * .catch(console.log); + * .catch(console.error); */ delete(timeout = 0) { return new Promise((resolve, reject) => { @@ -363,7 +363,7 @@ class Message { * // reply to a message * message.reply('Hey, I'm a reply!') * .then(msg => console.log(`Sent a reply to ${msg.author}`)) - * .catch(console.log); + * .catch(console.error); */ reply(content, options = {}) { content = this.client.resolver.resolveString(content); diff --git a/src/structures/Role.js b/src/structures/Role.js index 3c34518ca..ffb21eafb 100644 --- a/src/structures/Role.js +++ b/src/structures/Role.js @@ -151,7 +151,7 @@ class Role { * // edit a role * role.edit({name: 'new role'}) * .then(r => console.log(`Edited role ${r}`)) - * .catch(console.log); + * .catch(console.error); */ edit(data) { return this.client.rest.methods.updateGuildRole(this, data); @@ -165,7 +165,7 @@ class Role { * // set the name of the role * role.setName('new role') * .then(r => console.log(`Edited name of role ${r}`)) - * .catch(console.log); + * .catch(console.error); */ setName(name) { return this.client.rest.methods.updateGuildRole(this, { name }); @@ -179,7 +179,7 @@ class Role { * // set the color of a role * role.setColor('#FF0000') * .then(r => console.log(`Set color of role ${r}`)) - * .catch(console.log); + * .catch(console.error); */ setColor(color) { return this.client.rest.methods.updateGuildRole(this, { color }); @@ -193,7 +193,7 @@ class Role { * // set the hoist of the role * role.setHoist(true) * .then(r => console.log(`Role hoisted: ${r.hoist}`)) - * .catch(console.log); + * .catch(console.error); */ setHoist(hoist) { return this.client.rest.methods.updateGuildRole(this, { hoist }); @@ -207,7 +207,7 @@ class Role { * // set the position of the role * role.setPosition(1) * .then(r => console.log(`Role position: ${r.position}`)) - * .catch(console.log); + * .catch(console.error); */ setPosition(position) { return this.client.rest.methods.updateGuildRole(this, { position }); @@ -221,7 +221,7 @@ class Role { * // set the permissions of the role * role.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS']) * .then(r => console.log(`Role updated ${r}`)) - * .catch(console.log); + * .catch(console.error); */ setPermissions(permissions) { return this.client.rest.methods.updateGuildRole(this, { permissions }); @@ -234,7 +234,7 @@ class Role { * // delete a role * role.delete() * .then(r => console.log(`Deleted role ${r}`)) - * .catch(console.log); + * .catch(console.error); */ delete() { return this.client.rest.methods.deleteGuildRole(this); diff --git a/src/structures/VoiceChannel.js b/src/structures/VoiceChannel.js index eb7bcd760..3fd6b8090 100644 --- a/src/structures/VoiceChannel.js +++ b/src/structures/VoiceChannel.js @@ -53,7 +53,7 @@ class VoiceChannel extends GuildChannel { * // 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); + * .catch(console.error); */ setBitrate(bitrate) { return this.rest.client.rest.methods.updateChannel(this, { bitrate }); @@ -66,7 +66,7 @@ class VoiceChannel extends GuildChannel { * // join a voice channel * voiceChannel.join() * .then(connection => console.log('Connected!')) - * .catch(console.log); + * .catch(console.error); */ join() { return this.client.voice.joinChannel(this); diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index c5eb09c01..112636cff 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -51,7 +51,7 @@ class TextBasedChannel { * // send a message * channel.sendMessage('hello!') * .then(message => console.log(`Sent message: ${message.content}`)) - * .catch(console.log); + * .catch(console.error); */ sendMessage(content, options = {}) { return this.client.rest.methods.sendMessage(this, content, options); @@ -66,7 +66,7 @@ class TextBasedChannel { * // send a TTS message * channel.sendTTSMessage('hello!') * .then(message => console.log(`Sent tts message: ${message.content}`)) - * .catch(console.log); + * .catch(console.error); */ sendTTSMessage(content, options = {}) { Object.assign(options, { tts: true }); @@ -158,7 +158,7 @@ class TextBasedChannel { * // get messages * channel.fetchMessages({limit: 10}) * .then(messages => console.log(`Received ${messages.size} messages`)) - * .catch(console.log); + * .catch(console.error); */ fetchMessages(options = {}) { return new Promise((resolve, reject) => { From 1e57c968dd603fc08d24fdf475f8ea5328143bfb Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Tue, 27 Sep 2016 19:46:53 -0400 Subject: [PATCH 030/188] Made date/timestamps consistent and less shitty --- docs/docs.json | 2 +- src/client/Client.js | 2 +- src/structures/Channel.js | 17 ++++++++++--- src/structures/Emoji.js | 17 ++++++++++--- src/structures/Guild.js | 31 +++++++++++++++++------ src/structures/GuildMember.js | 24 +++++++++++------- src/structures/Invite.js | 19 ++++++-------- src/structures/Message.js | 36 ++++++++++++++++++--------- src/structures/Role.js | 17 ++++++++++--- src/structures/User.js | 47 +++++++++++++++++++---------------- 10 files changed, 137 insertions(+), 75 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 191cd590c..6631e6027 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1475016584426},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":215,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":224,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":244,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":259,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":269,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":349,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":355,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":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":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":227,"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":237,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":279,"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":684,"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":707,"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":732,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":37,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":55,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":76,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":130,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":20,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#creationDate","name":"creationDate","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":92,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#creationDate","name":"creationDate","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":58,"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":67,"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":80,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":95,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":121,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":84,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":272,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":280,"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":288,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":297,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":311,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":345,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":359,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":401,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":429,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":443,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":507,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":549,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":587,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":601,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":614,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":625,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":662,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":80,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":104,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":110,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":116,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":122,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":128,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":135,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":141,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":147,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":153,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":170,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#creationDate","name":"creationDate","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"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":223,"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":232,"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":242,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":251,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":260,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":52,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#creationDate","name":"creationDate","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":230,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":241,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":260,"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":269,"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":278,"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":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":321,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":330,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":351,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":359,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":367,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":380,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":391,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":95,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":103,"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":112,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":130,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":141,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":150,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":159,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":168,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":205,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":127,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":138,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":102,"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":110,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":119,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":291,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":306,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":325,"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":333,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":347,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":368,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":389,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":418,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":191,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":199,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":207,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":216,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":254,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":262,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":280,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":109,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":130,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":142,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":156,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":170,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":184,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":198,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":212,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":226,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":239,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":250,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":265,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#creationDate","name":"creationDate","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":98,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":100,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":110,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":120,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":129,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":139,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":157,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":58,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#creationDate","name":"creationDate","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":256,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1475019920612},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":215,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":224,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":244,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":259,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":269,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":349,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":355,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":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":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":227,"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":237,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":279,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":37,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":55,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":76,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":130,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":20,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":95,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":121,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":84,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":295,"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":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":80,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":104,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":110,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":116,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":122,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":128,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":135,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":141,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":147,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":153,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":159,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":175,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":229,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":238,"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":247,"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":257,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":266,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":275,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":224,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":236,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":247,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":257,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":266,"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":275,"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":284,"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":293,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":302,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":311,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":327,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":336,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":357,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":365,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":373,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":386,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":397,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":136,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":147,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":156,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":165,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":174,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":199,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":211,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":124,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":135,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":303,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":318,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":328,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":337,"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":345,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":359,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":401,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":430,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":219,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":228,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":266,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":274,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":282,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":292,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":118,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":151,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":165,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":179,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":193,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":207,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":235,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":248,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":259,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":274,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":107,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":256,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/client/Client.js b/src/client/Client.js index 88b276d0f..48fe2fd47 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -295,7 +295,7 @@ class Client extends EventEmitter { channels++; for (const message of channel.messages.values()) { - if (now - (message._editedTimestamp || message._timestamp) > lifetimeMs) { + if (now - (message.editedTimestamp || message.createdTimestamp) > lifetimeMs) { channel.messages.delete(message.id); messages++; } diff --git a/src/structures/Channel.js b/src/structures/Channel.js index e37c21193..2cdab15de 100644 --- a/src/structures/Channel.js +++ b/src/structures/Channel.js @@ -32,12 +32,21 @@ class Channel { } /** - * The time the channel was created + * The timestamp the channel was created at + * @type {number} * @readonly - * @type {Date} */ - get creationDate() { - return new Date((this.id / 4194304) + 1420070400000); + get createdTimestamp() { + return (this.id / 4194304) + 1420070400000; + } + + /** + * The time the channel was created + * @type {Date} + * @readonly + */ + get createdAt() { + return new Date(this.createdTimestamp); } /** diff --git a/src/structures/Emoji.js b/src/structures/Emoji.js index 626b5e44d..a4b8c1ce4 100644 --- a/src/structures/Emoji.js +++ b/src/structures/Emoji.js @@ -51,12 +51,21 @@ class Emoji { } /** - * The time the emoji was created + * The timestamp the emoji was created at + * @type {number} * @readonly - * @type {Date} */ - get creationDate() { - return new Date((this.id / 4194304) + 1420070400000); + get createdTimestamp() { + return (this.id / 4194304) + 1420070400000; + } + + /** + * The time the emoji was created + * @type {Date} + * @readonly + */ + get createdAt() { + return new Date(this.createdTimestamp); } /** diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 12060b215..fd2716f9f 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -152,10 +152,15 @@ class Guild { */ this.verificationLevel = data.verification_level; + /** + * The timestamp the client user joined the guild at + * @type {number} + */ + this.joinedTimestamp = data.joined_at ? new Date(data.joined_at).getTime() : this.joinedTimestamp; + this.id = data.id; this.available = !data.unavailable; this.features = data.features || this.features || []; - this._joinedTimestamp = data.joined_at ? new Date(data.joined_at).getTime() : this._joinedTimestamp; if (data.members) { this.members.clear(); @@ -208,20 +213,30 @@ class Guild { } /** - * The time the guild was created + * The timestamp the guild was created at + * @type {number} * @readonly - * @type {Date} */ - get creationDate() { - return new Date((this.id / 4194304) + 1420070400000); + get createdTimestamp() { + return (this.id / 4194304) + 1420070400000; } /** - * The date at which the logged-in client joined the guild. + * The time the guild was created * @type {Date} + * @readonly */ - get joinDate() { - return new Date(this._joinedTimestamp); + get createdAt() { + return new Date(this.createdTimestamp); + } + + /** + * The time the client user joined the guild + * @type {Date} + * @readonly + */ + get joinedAt() { + return new Date(this.joinedTimestamp); } /** diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index bd5be285c..fb7e48bbd 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -82,9 +82,23 @@ class GuildMember { */ this.nickname = data.nick || null; + /** + * The timestamp the member joined the guild at + * @type {number} + */ + this.joinedTimestamp = new Date(data.joined_at).getTime(); + this.user = data.user; this._roles = data.roles; - this._joinDate = new Date(data.joined_at).getTime(); + } + + /** + * The time the member joined the guild + * @type {Date} + * @readonly + */ + get joinedAt() { + return new Date(this.joinedTimestamp); } /** @@ -96,14 +110,6 @@ class GuildMember { return this.guild.presences.get(this.id); } - /** - * 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, mapped by the role ID. * @type {Collection} diff --git a/src/structures/Invite.js b/src/structures/Invite.js index 6e48ba0f9..268f3a303 100644 --- a/src/structures/Invite.js +++ b/src/structures/Invite.js @@ -92,23 +92,20 @@ class Invite { */ this.channel = this.client.channels.get(data.channel.id) || new PartialGuildChannel(this.client, data.channel); - this._createdAt = new Date(data.created_at).getTime(); + /** + * The timestamp the invite was created at + * @type {number} + */ + this.createdTimestamp = new Date(data.created_at).getTime(); } /** - * The creation date of the invite + * The time the invite was created * @type {Date} + * @readonly */ get createdAt() { - return new Date(this._createdAt); - } - - /** - * The creation date of the invite - * @type {Date} - */ - get creationDate() { - return new Date(this._createdAt); + return new Date(this.createdTimestamp); } /** diff --git a/src/structures/Message.js b/src/structures/Message.js index ccb56f673..816647174 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -87,6 +87,18 @@ class Message { this.attachments = new Collection(); for (const attachment of data.attachments) this.attachments.set(attachment.id, new Attachment(this, attachment)); + /** + * The timestamp the message was sent at + * @type {number} + */ + this.createdTimestamp = new Date(data.timestamp).getTime(); + + /** + * The timestamp the message was last edited at (if applicable) + * @type {?number} + */ + this.editedTimestamp = data.edited_timestamp ? new Date(data.edited_timestamp).getTime() : null; + /** * An object containing a further users, roles or channels collections * @type {Object} @@ -128,8 +140,6 @@ class Message { } } - this._timestamp = new Date(data.timestamp).getTime(); - this._editedTimestamp = data.edited_timestamp ? new Date(data.edited_timestamp).getTime() : null; this._edits = []; } @@ -139,9 +149,9 @@ class Message { 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.timestamp) this.createdTimestamp = new Date(data.timestamp).getTime(); if (data.edited_timestamp) { - this._editedTimestamp = data.edited_timestamp ? new Date(data.edited_timestamp).getTime() : null; + 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; @@ -185,19 +195,21 @@ class Message { } /** - * When the message was sent + * The time the message was sent * @type {Date} + * @readonly */ - get timestamp() { - return new Date(this._timestamp); + get createdAt() { + return new Date(this.createdTimestamp); } /** - * If the message was edited, the timestamp at which it was last edited + * The time the message was last edited at (if applicable) * @type {?Date} + * @readonly */ - get editedTimestamp() { - return new Date(this._editedTimestamp); + get editedAt() { + return this.editedTimestamp ? new Date(this.editedTimestamp) : null; } /** @@ -401,8 +413,8 @@ class Message { 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(); + this.createdTimestamp === new Date(rawData.timestamp).getTime() && + this.editedTimestamp === new Date(rawData.edited_timestamp).getTime(); } return equal; diff --git a/src/structures/Role.js b/src/structures/Role.js index ffb21eafb..f87a53d72 100644 --- a/src/structures/Role.js +++ b/src/structures/Role.js @@ -72,12 +72,21 @@ class Role { } /** - * The time the role was created + * The timestamp the role was created at + * @type {number} * @readonly - * @type {Date} */ - get creationDate() { - return new Date((this.id / 4194304) + 1420070400000); + get createdTimestamp() { + return (this.id / 4194304) + 1420070400000; + } + + /** + * The time the role was created + * @type {Date} + * @readonly + */ + get createdAt() { + return new Date(this.createdTimestamp); } /** diff --git a/src/structures/User.js b/src/structures/User.js index 78a27cd54..2bca92f7b 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -50,23 +50,6 @@ class User { this.bot = Boolean(data.bot); } - /** - * The presence of this user - * @readonly - * @type {Presence} - */ - get presence() { - if (this.client.presences.has(this.id)) { - return this.client.presences.get(this.id); - } - for (const guild of this.client.guilds.values()) { - if (guild.presences.has(this.id)) { - return guild.presences.get(this.id); - } - } - return new Presence(); - } - patch(data) { for (const prop of ['id', 'username', 'discriminator', 'avatar', 'bot']) { if (typeof data[prop] !== 'undefined') this[prop] = data[prop]; @@ -74,12 +57,34 @@ class User { } /** - * The time the user was created + * The timestamp the user was created at + * @type {number} * @readonly - * @type {Date} */ - get creationDate() { - return new Date((this.id / 4194304) + 1420070400000); + get createdTimestamp() { + return (this.id / 4194304) + 1420070400000; + } + + /** + * The time the user was created + * @type {Date} + * @readonly + */ + get createdAt() { + return new Date(this.createdTimestamp); + } + + /** + * The presence of this user + * @readonly + * @type {Presence} + */ + get presence() { + if (this.client.presences.has(this.id)) return this.client.presences.get(this.id); + for (const guild of this.client.guilds.values()) { + if (guild.presences.has(this.id)) return guild.presences.get(this.id); + } + return new Presence(); } /** From 1a3f5ca6a9bc442fc932005d9dcd57b68d5247cf Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Tue, 27 Sep 2016 19:50:03 -0400 Subject: [PATCH 031/188] Add Invite.expiresAt/expiresTimestamp --- docs/docs.json | 2 +- src/structures/Invite.js | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 6631e6027..d3724a9c9 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1475019920612},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":215,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":224,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":244,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":259,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":269,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":349,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":355,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":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":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":227,"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":237,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":279,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":37,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":55,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":76,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":130,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":20,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":95,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":121,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":84,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":295,"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":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":80,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":104,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":110,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":116,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":122,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":128,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":135,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":141,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":147,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":153,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":159,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":175,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":229,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":238,"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":247,"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":257,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":266,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":275,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":224,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":236,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":247,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":257,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":266,"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":275,"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":284,"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":293,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":302,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":311,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":327,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":336,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":357,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":365,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":373,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":386,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":397,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":136,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":147,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":156,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":165,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":174,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":199,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":211,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":124,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":135,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":303,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":318,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":328,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":337,"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":345,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":359,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":401,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":430,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":219,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":228,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":266,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":274,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":282,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":292,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":118,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":151,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":165,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":179,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":193,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":207,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":235,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":248,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":259,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":274,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":107,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":256,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1475020184550},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":215,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":224,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":244,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":259,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":269,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":349,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":355,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":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":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":227,"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":237,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":279,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":37,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":55,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":76,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":130,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":20,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":95,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":121,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":84,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":295,"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":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":80,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":104,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":110,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":116,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":122,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":128,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":135,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":141,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":147,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":153,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":159,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":175,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":229,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":238,"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":247,"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":257,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":266,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":275,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":224,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":236,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":247,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":257,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":266,"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":275,"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":284,"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":293,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":302,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":311,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":327,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":336,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":357,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":365,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":373,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":386,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":397,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":136,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":147,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":156,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":165,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":174,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":199,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":211,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":303,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":318,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":328,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":337,"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":345,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":359,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":401,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":430,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":219,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":228,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":266,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":274,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":282,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":292,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":118,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":151,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":165,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":179,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":193,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":207,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":235,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":248,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":259,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":274,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":107,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":256,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/structures/Invite.js b/src/structures/Invite.js index 268f3a303..bcf165182 100644 --- a/src/structures/Invite.js +++ b/src/structures/Invite.js @@ -108,6 +108,24 @@ class Invite { return new Date(this.createdTimestamp); } + /** + * The timestamp the invite will expire at + * @type {number} + * @readonly + */ + get expiresTimestamp() { + return this.createdTimestamp + (this.maxAge * 1000); + } + + /** + * The time the invite will expire + * @type {Date} + * @readonly + */ + get expiresAt() { + return new Date(this.expiresTimestamp); + } + /** * The URL to the invite * @type {string} From 973dbe826681c9cd76f40d69a8ca3e9cad0f4b2f Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Tue, 27 Sep 2016 20:07:33 -0400 Subject: [PATCH 032/188] Add more @readonly and clean up some stuff --- docs/docs.json | 2 +- src/client/Client.js | 6 +++--- src/sharding/ShardClientUtil.js | 2 ++ src/structures/ClientUser.js | 10 ++-------- src/structures/GroupDMChannel.js | 1 + src/structures/Guild.js | 16 ++++++++-------- src/structures/GuildMember.js | 4 ++++ src/structures/Message.js | 6 ++++++ src/structures/Role.js | 1 + src/structures/User.js | 2 +- src/structures/interface/TextBasedChannel.js | 2 ++ 11 files changed, 31 insertions(+), 21 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index d3724a9c9..80c878418 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1475020184550},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":215,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":224,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":244,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":259,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":269,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":349,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":355,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":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":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":227,"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":237,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":279,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":37,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":55,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":76,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":130,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":20,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":95,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":121,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":84,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":295,"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":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":80,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":104,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":110,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":116,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":122,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":128,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":135,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":141,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":147,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":153,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":159,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":175,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":229,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":238,"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":247,"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":257,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":266,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":275,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":224,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":236,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":247,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":257,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":266,"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":275,"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":284,"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":293,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":302,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":311,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":327,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":336,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":357,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":365,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":373,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":386,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":397,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":136,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":147,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":156,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":165,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":174,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":199,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":211,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":303,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":318,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":328,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":337,"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":345,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":359,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":401,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":430,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":219,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":228,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":266,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":274,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":282,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":292,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":118,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":151,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":165,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":179,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":193,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":207,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":235,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":248,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":259,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":274,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":107,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":256,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":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#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":315,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":245,"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":253,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1475021247196},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":215,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":224,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":244,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":259,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":269,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":349,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":355,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":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":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":227,"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":237,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":279,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":691,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":714,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":739,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":632,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":669,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":228,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":240,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":261,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":270,"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":279,"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":288,"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":297,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":306,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":315,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":331,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":340,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":361,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":390,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":401,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":148,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":157,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":166,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":175,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":184,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":202,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":215,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":180,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":194,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":208,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":236,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":249,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":275,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":256,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/client/Client.js b/src/client/Client.js index 48fe2fd47..73f4aba6a 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -157,8 +157,8 @@ class Client extends EventEmitter { /** * The status for the logged in Client. - * @readonly * @type {?number} + * @readonly */ get status() { return this.ws.status; @@ -166,8 +166,8 @@ class Client extends EventEmitter { /** * The uptime for the logged in Client. - * @readonly * @type {?number} + * @readonly */ get uptime() { return this.readyTime ? Date.now() - this.readyTime : null; @@ -175,8 +175,8 @@ class Client extends EventEmitter { /** * Returns a Collection, mapping Guild ID to Voice Connections. - * @readonly * @type {Collection} + * @readonly */ get voiceConnections() { return this.voice.connections; diff --git a/src/sharding/ShardClientUtil.js b/src/sharding/ShardClientUtil.js index c8012caaa..51c16fa8f 100644 --- a/src/sharding/ShardClientUtil.js +++ b/src/sharding/ShardClientUtil.js @@ -16,6 +16,7 @@ class ShardClientUtil { /** * ID of this shard * @type {number} + * @readonly */ get id() { return this.client.options.shardId; @@ -24,6 +25,7 @@ class ShardClientUtil { /** * Total number of shards * @type {number} + * @readonly */ get count() { return this.client.options.shardCount; diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index 4e1de9077..18e770077 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -148,19 +148,13 @@ class ClientUser extends User { if (data.game) { game = data.game; - if (game.url) { - game.type = 1; - } - } - - if (typeof data.afk !== 'undefined') { - afk = data.afk; + if (game.url) game.type = 1; } + if (typeof data.afk !== 'undefined') afk = data.afk; afk = Boolean(afk); this.localPresence = { status, game, afk }; - this.localPresence.since = 0; this.client.ws.send({ diff --git a/src/structures/GroupDMChannel.js b/src/structures/GroupDMChannel.js index 9e9296aae..d37baa6bf 100644 --- a/src/structures/GroupDMChannel.js +++ b/src/structures/GroupDMChannel.js @@ -80,6 +80,7 @@ class GroupDMChannel extends Channel { /** * The owner of this Group DM. * @type {User} + * @readonly */ get owner() { return this.client.users.get(this.ownerID); diff --git a/src/structures/Guild.js b/src/structures/Guild.js index fd2716f9f..7208bedc8 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -59,14 +59,6 @@ class Guild { } } - _setPresence(id, presence) { - if (this.presences.get(id)) { - this.presences.get(id).update(presence); - return; - } - this.presences.set(id, new Presence(presence)); - } - /** * Sets up the Guild * @param {*} data The raw data of the guild @@ -754,6 +746,14 @@ class Guild { } } + _setPresence(id, presence) { + if (this.presences.get(id)) { + this.presences.get(id).update(presence); + return; + } + this.presences.set(id, new Presence(presence)); + } + _checkChunks() { if (this._fetchWaiter) { if (this.members.size === this.memberCount) { diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index fb7e48bbd..d23a9d240 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -132,6 +132,7 @@ class GuildMember { /** * The role of the member with the highest position. * @type {Role} + * @readonly */ get highestRole() { return this.roles.reduce((prev, role) => @@ -178,6 +179,7 @@ class GuildMember { /** * The overall set of permissions for the guild member, taking only roles into account * @type {EvaluatedPermissions} + * @readonly */ get permissions() { if (this.user.id === this.guild.ownerID) return new EvaluatedPermissions(this, Constants.ALL_PERMISSIONS); @@ -195,6 +197,7 @@ class GuildMember { /** * Whether the member is kickable by the client user. * @type {boolean} + * @readonly */ get kickable() { if (this.user.id === this.guild.ownerID) return false; @@ -207,6 +210,7 @@ class GuildMember { /** * Whether the member is bannable by the client user. * @type {boolean} + * @readonly */ get bannable() { if (this.user.id === this.guild.ownerID) return false; diff --git a/src/structures/Message.js b/src/structures/Message.js index 816647174..ffd04b19b 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -215,6 +215,7 @@ class Message { /** * The guild the message was sent in (if in a guild channel) * @type {?Guild} + * @readonly */ get guild() { return this.channel.guild || null; @@ -224,6 +225,7 @@ class Message { * The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name, * the relevant mention in the message content will not be converted. * @type {string} + * @readonly */ get cleanContent() { return this.content @@ -262,6 +264,7 @@ class Message { * An array of cached versions of the message, including the current version. * Sorted from latest (first) to oldest (last). * @type {Message[]} + * @readonly */ get edits() { return this._edits.slice().unshift(this); @@ -270,6 +273,7 @@ class Message { /** * Whether the message is editable by the client user. * @type {boolean} + * @readonly */ get editable() { return this.author.id === this.client.user.id; @@ -278,6 +282,7 @@ class Message { /** * Whether the message is deletable by the client user. * @type {boolean} + * @readonly */ get deletable() { return this.author.id === this.client.user.id || (this.guild && @@ -288,6 +293,7 @@ class Message { /** * Whether the message is pinnable by the client user. * @type {boolean} + * @readonly */ get pinnable() { return !this.guild || diff --git a/src/structures/Role.js b/src/structures/Role.js index f87a53d72..1452eb10b 100644 --- a/src/structures/Role.js +++ b/src/structures/Role.js @@ -103,6 +103,7 @@ class Role { /** * The cached guild members that have this role. * @type {Collection} + * @readonly */ get members() { return this.guild.members.filter(m => m.roles.has(this.id)); diff --git a/src/structures/User.js b/src/structures/User.js index 2bca92f7b..2e1dbc6ed 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -76,8 +76,8 @@ class User { /** * The presence of this user - * @readonly * @type {Presence} + * @readonly */ get presence() { if (this.client.presences.has(this.id)) return this.client.presences.get(this.id); diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 112636cff..88b1cea5b 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -241,6 +241,7 @@ class TextBasedChannel { /** * Whether or not the typing indicator is being shown in the channel. * @type {boolean} + * @readonly */ get typing() { return this.client.user._typing.has(this.id); @@ -249,6 +250,7 @@ class TextBasedChannel { /** * Number of times `startTyping` has been called. * @type {number} + * @readonly */ get typingCount() { if (this.client.user._typing.has(this.id)) return this.client.user._typing.get(this.id).count; From b8e659d5447973f4621876195166b0cb3e4a6abe Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Tue, 27 Sep 2016 20:11:22 -0400 Subject: [PATCH 033/188] Make Client.emojis suck less --- src/client/Client.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/client/Client.js b/src/client/Client.js index 73f4aba6a..d145832ba 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -189,7 +189,9 @@ class Client extends EventEmitter { */ get emojis() { const emojis = new Collection(); - this.guilds.map(g => g.emojis.map(e => emojis.set(e.id, e))); + for (const guild of this.guilds.values()) { + for (const emoji of guild.emojis) emojis.set(emoji.id, emoji); + } return emojis; } From 682e33cad910dbf6c2f2bf07f5551bdbe5846fca Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Tue, 27 Sep 2016 20:21:52 -0400 Subject: [PATCH 034/188] Whoopsies --- 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 d145832ba..494dd5cbc 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -190,7 +190,7 @@ class Client extends EventEmitter { get emojis() { const emojis = new Collection(); for (const guild of this.guilds.values()) { - for (const emoji of guild.emojis) emojis.set(emoji.id, emoji); + for (const emoji of guild.emojis.values()) emojis.set(emoji.id, emoji); } return emojis; } From aed75e1f9ac996dc4c9cb3284da5c34f91ff1f88 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Tue, 27 Sep 2016 19:44:09 -0500 Subject: [PATCH 035/188] Add full guild emoji functionality (#749) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * all the emoji stuff * fix things for hydra 😘 * feck i need to stop committing on github * update docs again * Butts --- docs/docs.json | 2 +- src/client/ClientDataManager.js | 21 +++++++++++++++ src/client/actions/ActionsManager.js | 3 +++ src/client/actions/GuildEmojiCreate.js | 18 +++++++++++++ src/client/actions/GuildEmojiDelete.js | 18 +++++++++++++ src/client/actions/GuildEmojiUpdate.js | 27 +++++++++++++++++++ src/client/rest/RESTMethods.js | 11 ++++---- .../packets/handlers/GuildEmojiUpdate.js | 13 +++++++++ src/structures/Guild.js | 4 +-- src/util/Constants.js | 3 +++ 10 files changed, 112 insertions(+), 8 deletions(-) create mode 100644 src/client/actions/GuildEmojiCreate.js create mode 100644 src/client/actions/GuildEmojiDelete.js create mode 100644 src/client/actions/GuildEmojiUpdate.js create mode 100644 src/client/websocket/packets/handlers/GuildEmojiUpdate.js diff --git a/docs/docs.json b/docs/docs.json index 80c878418..6e93b6738 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1475021247196},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":215,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":224,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":244,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":259,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":269,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":349,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":355,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":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":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":227,"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":237,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":279,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":691,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":714,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":739,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":632,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":669,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":228,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":240,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":261,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":270,"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":279,"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":288,"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":297,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":306,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":315,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":331,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":340,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":361,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":390,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":401,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":148,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":157,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":166,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":175,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":184,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":202,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":215,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":180,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":194,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":208,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":236,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":249,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":275,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":256,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1475022711854},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":217,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":246,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":261,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":283,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":351,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":357,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":227,"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":237,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":279,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":691,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":714,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":739,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.array()[0];\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":632,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":669,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":228,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":240,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":261,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":270,"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":279,"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":288,"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":297,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":306,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":315,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":331,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":340,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":361,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":377,"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":390,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":401,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":148,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":157,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":166,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":175,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":184,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":202,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":215,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":180,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":194,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":208,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":236,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":249,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":275,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#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":256,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file diff --git a/src/client/ClientDataManager.js b/src/client/ClientDataManager.js index fb8f27c1e..e56a8f6a8 100644 --- a/src/client/ClientDataManager.js +++ b/src/client/ClientDataManager.js @@ -3,6 +3,7 @@ const cloneObject = require('../util/CloneObject'); const Guild = require('../structures/Guild'); const User = require('../structures/User'); const DMChannel = require('../structures/DMChannel'); +const Emoji = require('../structures/Emoji'); const TextChannel = require('../structures/TextChannel'); const VoiceChannel = require('../structures/VoiceChannel'); const GuildChannel = require('../structures/GuildChannel'); @@ -73,6 +74,26 @@ class ClientDataManager { return null; } + newEmoji(data, guild) { + const already = guild.emojis.has(data.id); + if (data && !already) { + let emoji = new Emoji(guild, data); + this.client.emit(Constants.Events.EMOJI_CREATE, emoji); + guild.emojis.set(emoji.id, emoji); + return emoji; + } else if (already) { + return guild.emojis.get(data.id); + } + + return null; + } + + killEmoji(emoji) { + if (!(emoji instanceof Emoji && emoji.guild)) return; + this.client.emit(Constants.Events.EMOJI_DELETE, emoji); + emoji.guild.emojis.delete(emoji.id); + } + killGuild(guild) { const already = this.client.guilds.has(guild.id); this.client.guilds.delete(guild.id); diff --git a/src/client/actions/ActionsManager.js b/src/client/actions/ActionsManager.js index f9addff29..331d8ce2a 100644 --- a/src/client/actions/ActionsManager.js +++ b/src/client/actions/ActionsManager.js @@ -20,6 +20,9 @@ class ActionsManager { this.register('UserGet'); this.register('UserUpdate'); this.register('GuildSync'); + this.register('GuildEmojiCreate'); + this.register('GuildEmojiDelete'); + this.register('GuildEmojiUpdate'); } register(name) { diff --git a/src/client/actions/GuildEmojiCreate.js b/src/client/actions/GuildEmojiCreate.js new file mode 100644 index 000000000..a3f238fe5 --- /dev/null +++ b/src/client/actions/GuildEmojiCreate.js @@ -0,0 +1,18 @@ +const Action = require('./Action'); + +class EmojiCreateAction extends Action { + handle(data, guild) { + const client = this.client; + const emoji = client.dataManager.newEmoji(data, guild); + return { + emoji, + }; + } +} + +/** + * Emitted whenever an emoji is created + * @event Client#guildEmojiCreate + * @param {Emoji} emoji The emoji that was created. + */ +module.exports = EmojiCreateAction; diff --git a/src/client/actions/GuildEmojiDelete.js b/src/client/actions/GuildEmojiDelete.js new file mode 100644 index 000000000..7fdd1ca32 --- /dev/null +++ b/src/client/actions/GuildEmojiDelete.js @@ -0,0 +1,18 @@ +const Action = require('./Action'); + +class EmojiDeleteAction extends Action { + handle(data) { + const client = this.client; + client.dataManager.killEmoji(data); + return { + data, + }; + } +} + +/** + * Emitted whenever an emoji is deleted + * @event Client#guildEmojiDelete + * @param {Emoji} emoji The emoji that was deleted. + */ +module.exports = EmojiDeleteAction; diff --git a/src/client/actions/GuildEmojiUpdate.js b/src/client/actions/GuildEmojiUpdate.js new file mode 100644 index 000000000..087e42046 --- /dev/null +++ b/src/client/actions/GuildEmojiUpdate.js @@ -0,0 +1,27 @@ +const Action = require('./Action'); +const Constants = require('../../util/Constants'); + +class GuildEmojiUpdateAction extends Action { + handle(data, guild) { + const client = this.client; + for (let emoji of data.emojis) { + const already = guild.emojis.has(emoji.id); + emoji = client.dataManager.newEmoji(emoji, guild); + if (already) client.emit(Constants.Events.GUILD_EMOJI_UPDATE, guild, emoji); + } + for (let emoji of guild.emojis) { + if (!data.emoijs.has(emoji.id)) client.dataManager.killEmoji(emoji); + } + return { + emojis: data.emojis, + }; + } +} + +/** + * Emitted whenever an emoji is updated + * @event Client#guildEmojiUpdate + * @param {Guild} guild The guild that the emoji was updated in. + * @param {Emoji} emoji The emoji that was updated. + */ +module.exports = GuildEmojiUpdateAction; diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 736211f48..25b245940 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -7,7 +7,6 @@ const User = requireStructure('User'); const GuildMember = requireStructure('GuildMember'); const Role = requireStructure('Role'); const Invite = requireStructure('Invite'); -const Emoji = requireStructure('Emoji'); class RESTMethods { constructor(restManager) { @@ -522,15 +521,17 @@ class RESTMethods { return new Promise((resolve, reject) => { this.rest.makeRequest('post', `${Constants.Endpoints.guildEmojis(guild.id)}`, true, { name: name, image: image }) .then(data => { - resolve(new Emoji(guild, data)); + resolve(this.rest.client.actions.EmojiCreate.handle(data, guild).emoji); }).catch(reject); }); } - deleteEmoji(guild, id) { + deleteEmoji(emoji) { return new Promise((resolve, reject) => { - this.rest.makeRequest('delete', `${Constants.Endpoints.guildEmojis(guild.id)}/${id}`, true) - .then(resolve).catch(reject); + this.rest.makeRequest('delete', `${Constants.Endpoints.guildEmojis(emoji.guild.id)}/${emoji.id}`, true) + .then(() => { + resolve(this.rest.client.actions.EmojiDelete.handle(emoji).data); + }).catch(reject); }); } } diff --git a/src/client/websocket/packets/handlers/GuildEmojiUpdate.js b/src/client/websocket/packets/handlers/GuildEmojiUpdate.js new file mode 100644 index 000000000..5f983cd5d --- /dev/null +++ b/src/client/websocket/packets/handlers/GuildEmojiUpdate.js @@ -0,0 +1,13 @@ +const AbstractHandler = require('./AbstractHandler'); + +class GuildEmojiUpdate extends AbstractHandler { + handle(packet) { + const client = this.packetManager.client; + const data = packet.d; + const guild = client.guilds.get(data.guild_id); + if (!guild) return; + client.actions.EmojiUpdate.handle(data, guild); + } +} + +module.exports = GuildEmojiUpdate; diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 7208bedc8..5867691c7 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -592,8 +592,8 @@ class Guild { * @returns {Promise} */ deleteEmoji(emoji) { - if (emoji instanceof Emoji) emoji = emoji.id; - return this.client.rest.methods.deleteEmoji(this, emoji); + if (!(emoji instanceof Emoji)) emoji = this.emojis.get(emoji); + return this.client.rest.methods.deleteEmoji(emoji); } /** diff --git a/src/util/Constants.js b/src/util/Constants.js index b11592822..6a0f250fa 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -158,6 +158,9 @@ exports.Events = { GUILD_ROLE_DELETE: 'guildRoleDelete', GUILD_ROLE_UPDATE: 'guildRoleUpdate', GUILD_MEMBER_AVAILABLE: 'guildMemberAvailable', + GUILD_EMOJI_CREATE: 'guildEmojiCreate', + GUILD_EMOJI_DELETE: 'guildEmojiDelete', + GUILD_EMOJI_UPDATE: 'guildEmojiUpdate', CHANNEL_CREATE: 'channelCreate', CHANNEL_DELETE: 'channelDelete', CHANNEL_UPDATE: 'channelUpdate', From 0bcca7bb5559ecd31ef450a88a55eadba5a45aba Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Tue, 27 Sep 2016 20:47:12 -0400 Subject: [PATCH 036/188] Add Collection.concat --- docs/docs.json | 2 +- src/util/Collection.js | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 6e93b6738..cae7808c8 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1475022711854},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":217,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":246,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":261,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":283,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":351,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":357,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":227,"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":237,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":279,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":691,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":714,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":739,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.array()[0];\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":632,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":669,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":228,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":240,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":261,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":270,"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":279,"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":288,"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":297,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":306,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":315,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":331,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":340,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":361,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":377,"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":390,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":401,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":148,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":157,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":166,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":175,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":184,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":202,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":215,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":180,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":194,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":208,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":236,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":249,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":275,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#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":256,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1475023622272},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":217,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":246,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":261,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":283,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":351,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":357,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":227,"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":237,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":279,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":691,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":714,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":739,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":632,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":669,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":228,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":240,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":261,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":270,"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":279,"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":288,"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":297,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":306,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":315,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":331,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":340,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":361,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":390,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":401,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":148,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":157,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":166,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":175,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":184,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":202,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":215,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":180,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":194,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":208,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":236,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":249,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":275,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":257,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":271,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/util/Collection.js b/src/util/Collection.js index 70b29b9c2..eeb909e61 100644 --- a/src/util/Collection.js +++ b/src/util/Collection.js @@ -248,6 +248,21 @@ class Collection extends Map { return currentVal; } + /** + * Combines this collection with others into a new collection. None of the source collections are modified. + * @param {Collection} collections Collections to merge + * @returns {Collection} + * @example const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl); + */ + concat(...collections) { + const newColl = new this.constructor(); + for (const [key, val] of this) newColl.set(key, val); + for (const coll of collections) { + for (const [key, val] of coll) newColl.set(key, val); + } + return newColl; + } + /** * If the items in this collection have a delete method (e.g. messages), invoke * the delete method. Returns an array of promises From f0741f22880556e46759f22411ee558c26c25acd Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Tue, 27 Sep 2016 21:18:22 -0400 Subject: [PATCH 037/188] Add ShardClientUtil export --- src/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.js b/src/index.js index 1480ca4bf..9fa508642 100644 --- a/src/index.js +++ b/src/index.js @@ -3,6 +3,7 @@ const path = require('path'); module.exports = { Client: require('./client/Client'), Shard: require('./sharding/Shard'), + ShardClientUtil: require('./sharding/ShardClientUtil'), ShardingManager: require('./sharding/ShardingManager'), Collection: require('./util/Collection'), From 155b4383d25708c863fd150e930f7e9a1e237bd7 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Tue, 27 Sep 2016 22:13:04 -0400 Subject: [PATCH 038/188] No, Hydra! Bad! --- docs/docs.json | 2 +- src/structures/ClientUser.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index cae7808c8..021fa769c 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1475023622272},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":217,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":246,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":261,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":283,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":351,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":357,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":227,"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":237,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":279,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":691,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":714,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":739,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":632,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":669,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":228,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":240,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":261,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":270,"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":279,"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":288,"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":297,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":306,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":315,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":331,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":340,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":361,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":390,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":401,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":148,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":157,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":166,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":175,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":184,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":202,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":215,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":180,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":194,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":208,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":236,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":249,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":275,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":257,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":271,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1475028766912},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":217,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":246,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":261,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":283,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":351,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":357,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":227,"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":237,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":279,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":691,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":714,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":739,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":632,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":669,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":228,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":240,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":261,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":270,"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":279,"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":288,"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":297,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":306,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":315,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":331,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":340,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":361,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":390,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":401,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":148,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":157,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":166,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":175,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":184,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":202,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":215,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":180,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":194,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":208,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":236,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":249,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":275,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":257,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":271,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index 18e770077..4e4d18cc7 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -90,7 +90,7 @@ class ClientUser extends User { /** * Set the status of the logged in user. * @param {string} status can be `online`, `idle`, `invisible` or `dnd` (do not disturb) - * @returns {Promise} + * @returns {Promise} */ setStatus(status) { return this.setPresence({ status }); @@ -100,7 +100,7 @@ class ClientUser extends User { * Set the current game of the logged in user. * @param {string} game the game being played * @param {string} [streamingURL] an optional URL to a twitch stream, if one is available. - * @returns {Promise} + * @returns {Promise} */ setGame(game, streamingURL) { return this.setPresence({ game: { @@ -112,7 +112,7 @@ class ClientUser extends User { /** * Set/remove the AFK flag for the current user. * @param {boolean} afk whether or not the user is AFK. - * @returns {Promise} + * @returns {Promise} */ setAFK(afk) { return this.setPresence({ afk }); @@ -121,7 +121,7 @@ class ClientUser extends User { /** * Set the full presence of the current user. * @param {Object} data the data to provide - * @returns {Promise} + * @returns {Promise} */ setPresence(data) { // {"op":3,"d":{"status":"dnd","since":0,"game":null,"afk":false}} From cda31dd2248221ab2f4e1cf9d4c8fda615dc70f1 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 28 Sep 2016 18:03:17 +0100 Subject: [PATCH 039/188] Fix a potential bug some people have in retrieving endpoints --- docs/docs.json | 2 +- src/client/websocket/packets/handlers/VoiceServerUpdate.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 021fa769c..f590fc81b 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1475028766912},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":217,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":246,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":261,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":283,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":351,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":357,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":227,"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":237,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":279,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":691,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":714,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":739,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":632,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":669,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":228,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":240,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":261,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":270,"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":279,"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":288,"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":297,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":306,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":315,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":331,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":340,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":361,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":390,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":401,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":148,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":157,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":166,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":175,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":184,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":202,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":215,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":180,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":194,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":208,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":236,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":249,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":275,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":257,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":271,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1475082209976},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":217,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":246,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":261,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":283,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":351,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":357,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":227,"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":237,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":279,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":691,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":714,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":739,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.array()[0];\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":632,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":669,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":228,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":240,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":261,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":270,"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":279,"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":288,"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":297,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":306,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":315,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":331,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":340,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":361,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":377,"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":390,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":401,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":148,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":157,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":166,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":175,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":184,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":202,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":215,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":180,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":194,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":208,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":236,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":249,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":275,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":257,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":271,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file diff --git a/src/client/websocket/packets/handlers/VoiceServerUpdate.js b/src/client/websocket/packets/handlers/VoiceServerUpdate.js index 146a3efc3..108d54ccc 100644 --- a/src/client/websocket/packets/handlers/VoiceServerUpdate.js +++ b/src/client/websocket/packets/handlers/VoiceServerUpdate.js @@ -12,7 +12,7 @@ class VoiceServerUpdate extends AbstractHandler { handle(packet) { const client = this.packetManager.client; const data = packet.d; - if (client.voice.pending.has(data.guild_id)) { + if (client.voice.pending.has(data.guild_id) && data.endpoint) { client.voice._receivedVoiceServer(data.guild_id, data.token, data.endpoint); } } From 543e814f8ec5e9f02aa456aef21eafd8e05dbc80 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Fri, 30 Sep 2016 02:45:16 -0400 Subject: [PATCH 040/188] Move protocol version to a constant, and reorganise constants a bit --- docs/docs.json | 2 +- src/client/rest/RESTMethods.js | 2 +- src/util/Constants.js | 46 ++++++++++++++++------------------ 3 files changed, 24 insertions(+), 26 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index f590fc81b..bd5bda86e 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1475082209976},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":217,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":246,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":261,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":283,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":351,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":357,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":227,"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":237,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":279,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":691,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":714,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":739,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.array()[0];\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":632,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":669,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":228,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":240,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":261,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":270,"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":279,"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":288,"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":297,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":306,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":315,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":331,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":340,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":361,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":377,"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":390,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":401,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":148,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":157,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":166,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":175,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":184,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":202,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":215,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":180,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":194,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":208,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":236,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":249,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":275,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":257,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":271,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1475217879856},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":217,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":246,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":261,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":283,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":351,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":357,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":227,"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":237,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":279,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":691,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":714,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":739,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":632,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":669,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":228,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":240,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":261,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":270,"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":279,"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":288,"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":297,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":306,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":315,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":331,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":340,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":361,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":390,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":401,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":148,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":157,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":166,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":175,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":184,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":202,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":215,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":180,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":194,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":208,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":236,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":249,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":275,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":257,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":271,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 25b245940..cce975ee3 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -40,7 +40,7 @@ class RESTMethods { return new Promise((resolve, reject) => { this.rest.makeRequest('get', Constants.Endpoints.gateway, true) .then(res => { - this.rest.client.ws.gateway = `${res.url}/?encoding=json&v=${this.rest.client.options.protocolVersion}`; + this.rest.client.ws.gateway = `${res.url}/?encoding=json&v=${Constants.PROTOCOL_VERSION}`; resolve(this.rest.client.ws.gateway); }) .catch(reject); diff --git a/src/util/Constants.js b/src/util/Constants.js index 6a0f250fa..8cdd09b84 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -1,3 +1,5 @@ +exports.Package = require('../../package.json'); + /** * Options for a Client. * @typedef {Object} ClientOptions @@ -10,7 +12,8 @@ * (in seconds, 0 for forever) * @property {number} [messageSweepInterval=0] How frequently to remove messages from the cache that are older than * the max message lifetime (in seconds, 0 for never) - * @property {boolean} [fetchAllMembers=false] Whether to cache all guild members and users upon startup + * @property {boolean} [fetchAllMembers=false] Whether to cache all guild members and users upon startup, as well as + * upon joining a guild * @property {boolean} [disableEveryone=false] Default value for MessageOptions.disableEveryone * @property {number} [restWsBridgeTimeout=5000] Maximum time permitted between REST responses and their * corresponding websocket events @@ -26,7 +29,6 @@ exports.DefaultOptions = { fetchAllMembers: false, disableEveryone: false, restWsBridgeTimeout: 5000, - protocolVersion: 6, /** * Websocket options. These are left as snake_case to match the API. @@ -47,23 +49,6 @@ exports.DefaultOptions = { }, }; -exports.Status = { - READY: 0, - CONNECTING: 1, - RECONNECTING: 2, - IDLE: 3, - NEARLY: 4, -}; - -exports.ChannelTypes = { - text: 0, - DM: 1, - voice: 2, - groupDM: 3, -}; - -exports.Package = require('../../package.json'); - exports.Errors = { NO_TOKEN: 'Request to use token, but token was unavailable to the client.', NO_BOT_ACCOUNT: 'You ideally should be using a bot account!', @@ -75,10 +60,10 @@ exports.Errors = { INVALID_SHARD: 'Invalid shard settings were provided.', }; -const API = `https://discordapp.com/api/v${exports.DefaultOptions.protocolVersion}`; - +const PROTOCOL_VERSION = exports.PROTOCOL_VERSION = 6; +const API = exports.API = `https://discordapp.com/api/v${PROTOCOL_VERSION}`; const Endpoints = exports.Endpoints = { - // general endpoints + // general login: `${API}/auth/login`, logout: `${API}/auth/logout`, gateway: `${API}/gateway`, @@ -120,6 +105,21 @@ const Endpoints = exports.Endpoints = { channelMessage: (channelID, messageID) => `${Endpoints.channelMessages(channelID)}/${messageID}`, }; +exports.Status = { + READY: 0, + CONNECTING: 1, + RECONNECTING: 2, + IDLE: 3, + NEARLY: 4, +}; + +exports.ChannelTypes = { + text: 0, + DM: 1, + voice: 2, + groupDM: 3, +}; + exports.OPCodes = { DISPATCH: 0, HEARTBEAT: 1, @@ -248,7 +248,5 @@ const PermissionFlags = exports.PermissionFlags = { let _ALL_PERMISSIONS = 0; for (const key in PermissionFlags) _ALL_PERMISSIONS |= PermissionFlags[key]; - exports.ALL_PERMISSIONS = _ALL_PERMISSIONS; - exports.DEFAULT_PERMISSIONS = 104324097; From 1473f8c46218d17248dc5ae333a0d9966cfbac7b Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Fri, 30 Sep 2016 02:50:20 -0400 Subject: [PATCH 041/188] Rearrange event constants --- src/util/Constants.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/util/Constants.js b/src/util/Constants.js index 8cdd09b84..de3ce0430 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -146,9 +146,9 @@ exports.Events = { READY: 'ready', GUILD_CREATE: 'guildCreate', GUILD_DELETE: 'guildDelete', + GUILD_UPDATE: 'guildUpdate', GUILD_UNAVAILABLE: 'guildUnavailable', GUILD_AVAILABLE: 'guildAvailable', - GUILD_UPDATE: 'guildUpdate', GUILD_BAN_ADD: 'guildBanAdd', GUILD_BAN_REMOVE: 'guildBanRemove', GUILD_MEMBER_ADD: 'guildMemberAdd', @@ -161,24 +161,24 @@ exports.Events = { GUILD_EMOJI_CREATE: 'guildEmojiCreate', GUILD_EMOJI_DELETE: 'guildEmojiDelete', GUILD_EMOJI_UPDATE: 'guildEmojiUpdate', + GUILD_MEMBERS_CHUNK: 'guildMembersChunk', + GUILD_MEMBER_SPEAKING: 'guildMemberSpeaking', 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', + CHANNEL_PINS_UPDATE: 'channelPinsUpdate', MESSAGE_CREATE: 'message', MESSAGE_DELETE: 'messageDelete', MESSAGE_UPDATE: 'messageUpdate', + MESSAGE_BULK_DELETE: 'messageDeleteBulk', + USER_UPDATE: 'userUpdate', + PRESENCE_UPDATE: 'presenceUpdate', + VOICE_STATE_UPDATE: 'voiceStateUpdate', + TYPING_START: 'typingStart', + TYPING_STOP: 'typingStop', DISCONNECT: 'disconnect', RECONNECTING: 'reconnecting', - GUILD_MEMBER_SPEAKING: 'guildMemberSpeaking', - MESSAGE_BULK_DELETE: 'messageDeleteBulk', - CHANNEL_PINS_UPDATE: 'channelPinsUpdate', + WARN: 'warn', DEBUG: 'debug', }; From 5997aecc2232c9f28ae8af681d4ed691bf00e802 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Fri, 30 Sep 2016 02:53:57 -0400 Subject: [PATCH 042/188] Rearrange events some more --- src/util/Constants.js | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/util/Constants.js b/src/util/Constants.js index de3ce0430..9cf3771c9 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -149,20 +149,20 @@ exports.Events = { GUILD_UPDATE: 'guildUpdate', GUILD_UNAVAILABLE: 'guildUnavailable', GUILD_AVAILABLE: 'guildAvailable', - GUILD_BAN_ADD: 'guildBanAdd', - GUILD_BAN_REMOVE: 'guildBanRemove', GUILD_MEMBER_ADD: 'guildMemberAdd', GUILD_MEMBER_REMOVE: 'guildMemberRemove', GUILD_MEMBER_UPDATE: 'guildMemberUpdate', + GUILD_MEMBER_AVAILABLE: 'guildMemberAvailable', + GUILD_MEMBER_SPEAKING: 'guildMemberSpeaking', + GUILD_MEMBERS_CHUNK: 'guildMembersChunk', GUILD_ROLE_CREATE: 'guildRoleCreate', GUILD_ROLE_DELETE: 'guildRoleDelete', GUILD_ROLE_UPDATE: 'guildRoleUpdate', - GUILD_MEMBER_AVAILABLE: 'guildMemberAvailable', GUILD_EMOJI_CREATE: 'guildEmojiCreate', GUILD_EMOJI_DELETE: 'guildEmojiDelete', GUILD_EMOJI_UPDATE: 'guildEmojiUpdate', - GUILD_MEMBERS_CHUNK: 'guildMembersChunk', - GUILD_MEMBER_SPEAKING: 'guildMemberSpeaking', + GUILD_BAN_ADD: 'guildBanAdd', + GUILD_BAN_REMOVE: 'guildBanRemove', CHANNEL_CREATE: 'channelCreate', CHANNEL_DELETE: 'channelDelete', CHANNEL_UPDATE: 'channelUpdate', @@ -183,18 +183,11 @@ exports.Events = { }; 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_SYNC: 'GUILD_SYNC', GUILD_CREATE: 'GUILD_CREATE', GUILD_DELETE: 'GUILD_DELETE', + GUILD_UPDATE: 'GUILD_UPDATE', GUILD_MEMBER_ADD: 'GUILD_MEMBER_ADD', GUILD_MEMBER_REMOVE: 'GUILD_MEMBER_REMOVE', GUILD_MEMBER_UPDATE: 'GUILD_MEMBER_UPDATE', @@ -202,16 +195,23 @@ exports.WSEvents = { 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', + GUILD_BAN_ADD: 'GUILD_BAN_ADD', + GUILD_BAN_REMOVE: 'GUILD_BAN_REMOVE', + CHANNEL_CREATE: 'CHANNEL_CREATE', + CHANNEL_DELETE: 'CHANNEL_DELETE', + CHANNEL_UPDATE: 'CHANNEL_UPDATE', + CHANNEL_PINS_UPDATE: 'CHANNEL_PINS_UPDATE', + MESSAGE_CREATE: 'MESSAGE_CREATE', + MESSAGE_DELETE: 'MESSAGE_DELETE', + MESSAGE_UPDATE: 'MESSAGE_UPDATE', + MESSAGE_DELETE_BULK: 'MESSAGE_DELETE_BULK', USER_UPDATE: 'USER_UPDATE', + PRESENCE_UPDATE: 'PRESENCE_UPDATE', VOICE_STATE_UPDATE: 'VOICE_STATE_UPDATE', + TYPING_START: 'TYPING_START', FRIEND_ADD: 'RELATIONSHIP_ADD', FRIEND_REMOVE: 'RELATIONSHIP_REMOVE', 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 b396d15b37dce8d1c27bd0d7c2cf755dab4fa2b3 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Fri, 30 Sep 2016 02:58:18 -0400 Subject: [PATCH 043/188] Remove usage of path.join for version export --- src/index.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index 9fa508642..1d23a027c 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,3 @@ -const path = require('path'); - module.exports = { Client: require('./client/Client'), Shard: require('./sharding/Shard'), @@ -31,5 +29,5 @@ module.exports = { User: require('./structures/User'), VoiceChannel: require('./structures/VoiceChannel'), - version: require(path.join(__dirname, '..', 'package')).version, + version: require('../package').version, }; From 4934874613ca17d92277458532e16d4d03bc6f10 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Fri, 30 Sep 2016 03:05:37 -0400 Subject: [PATCH 044/188] Inline a line --- src/client/voice/dispatcher/StreamDispatcher.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/client/voice/dispatcher/StreamDispatcher.js b/src/client/voice/dispatcher/StreamDispatcher.js index 887c0d82a..ab80ddfe4 100644 --- a/src/client/voice/dispatcher/StreamDispatcher.js +++ b/src/client/voice/dispatcher/StreamDispatcher.js @@ -53,9 +53,7 @@ class StreamDispatcher extends EventEmitter { _sendBuffer(buffer, sequence, timestamp) { let repeats = this.passes; const packet = this._createPacket(sequence, timestamp, this.player.opusEncoder.encode(buffer)); - while (repeats--) { - this.player.connection.udp.send(packet); - } + while (repeats--) this.player.connection.udp.send(packet); } /** From f157bcf5e8bd464dc49759e46c4d9ed04a1aa253 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Fri, 30 Sep 2016 03:09:08 -0400 Subject: [PATCH 045/188] Rearrange StreamDispatcher code --- .../voice/dispatcher/StreamDispatcher.js | 162 +++++++++--------- 1 file changed, 81 insertions(+), 81 deletions(-) diff --git a/src/client/voice/dispatcher/StreamDispatcher.js b/src/client/voice/dispatcher/StreamDispatcher.js index ab80ddfe4..f6bb99be5 100644 --- a/src/client/voice/dispatcher/StreamDispatcher.js +++ b/src/client/voice/dispatcher/StreamDispatcher.js @@ -41,23 +41,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 - */ - _setSpeaking(value) { - this.speaking = value; - this.emit('speaking', value); - } - - _sendBuffer(buffer, sequence, timestamp) { - let repeats = this.passes; - const packet = this._createPacket(sequence, timestamp, this.player.opusEncoder.encode(buffer)); - while (repeats--) this.player.connection.udp.send(packet); - } - - /** - * how long the stream dispatcher has been "speaking" for + * How long the stream dispatcher has been "speaking" for * @type {number} * @readonly */ @@ -66,7 +50,7 @@ class StreamDispatcher extends EventEmitter { } /** - * The total time, taking into account pauses and skips, that the dispatcher has been streaming for. + * The total time, taking into account pauses and skips, that the dispatcher has been streaming for * @type {number} * @readonly */ @@ -74,6 +58,76 @@ class StreamDispatcher extends EventEmitter { return this.time + this.streamingData.pausedTime; } + /** + * 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) + */ + pause() { + this._setPaused(true); + } + + /** + * Resumes sending voice packets to the voice connection (may be further on in the stream than when paused) + */ + resume() { + this._setPaused(false); + } + + /** + * Stops the current stream permanently and emits an `end` event. + */ + end() { + this._triggerTerminalState('end', 'user requested'); + } + + _setSpeaking(value) { + this.speaking = value; + /** + * Emitted when the dispatcher starts/stops speaking + * @event StreamDispatcher#speaking + * @param {boolean} value Whether or not the dispatcher is speaking + */ + this.emit('speaking', value); + } + + _sendBuffer(buffer, sequence, timestamp) { + let repeats = this.passes; + const packet = this._createPacket(sequence, timestamp, this.player.opusEncoder.encode(buffer)); + while (repeats--) this.player.connection.udp.send(packet); + } + _createPacket(sequence, timestamp, buffer) { const packetBuffer = new Buffer(buffer.length + 28); packetBuffer.fill(0); @@ -169,21 +223,21 @@ class StreamDispatcher extends EventEmitter { } } - /** - * Emitted once the stream has ended. Attach a `once` listener to this. - * @event StreamDispatcher#end - */ _triggerEnd() { + /** + * Emitted once the stream has ended. Attach a `once` listener to this. + * @event StreamDispatcher#end + */ 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 encountered error - */ _triggerError(err) { 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 encountered error + */ this.emit('error', err); } @@ -236,60 +290,6 @@ class StreamDispatcher extends EventEmitter { this._setSpeaking(true); } } - - /** - * Stops the current stream permanently and emits an `end` event. - */ - end() { - 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) - */ - pause() { - this._setPaused(true); - } - - /** - * Resumes sending voice packets to the voice connection (may be further on in the stream than when paused) - */ - resume() { - this._setPaused(false); - } } module.exports = StreamDispatcher; From b1322cbc69b423c4f63277b6ab717ec4186ebc16 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Fri, 30 Sep 2016 03:12:01 -0400 Subject: [PATCH 046/188] Initialise and document StreamDispatcher.paused --- docs/docs.json | 2 +- src/client/voice/dispatcher/StreamDispatcher.js | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index bd5bda86e..368ababc1 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1475217879856},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":217,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":246,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":261,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":283,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":351,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":357,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":227,"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":237,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":279,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":691,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":714,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":739,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":245,"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":262,"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":270,"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":278,"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":285,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":292,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":40,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"how long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":254,"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":43,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":134,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":174,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":182,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":632,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":669,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":228,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":240,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":261,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":270,"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":279,"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":288,"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":297,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":306,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":315,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":331,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":340,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":361,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":390,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":401,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":148,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":157,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":166,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":175,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":184,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":202,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":215,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":180,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":194,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":208,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":236,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":249,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":275,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":257,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":271,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1475219507054},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":217,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":246,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":261,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":283,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":351,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":357,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":227,"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":237,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":279,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":691,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":714,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":739,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":632,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":669,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":228,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":240,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":261,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":270,"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":279,"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":288,"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":297,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":306,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":315,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":331,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":340,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":361,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":390,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":401,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":148,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":157,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":166,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":175,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":184,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":202,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":215,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":180,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":194,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":208,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":236,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":249,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":275,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":257,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":271,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/client/voice/dispatcher/StreamDispatcher.js b/src/client/voice/dispatcher/StreamDispatcher.js index f6bb99be5..fa23a364e 100644 --- a/src/client/voice/dispatcher/StreamDispatcher.js +++ b/src/client/voice/dispatcher/StreamDispatcher.js @@ -32,12 +32,19 @@ class StreamDispatcher extends EventEmitter { this._startStreaming(); this._triggered = false; this._volume = streamOptions.volume; + /** * How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5 * aren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime. * @type {number} */ this.passes = streamOptions.passes || 1; + + /** + * Whether playing is paused + * @type {boolean} + */ + this.paused = false; } /** From 428ee2f71824b39375a8555e0a1043e1c05b0c67 Mon Sep 17 00:00:00 2001 From: bdistin Date: Fri, 30 Sep 2016 16:08:19 -0500 Subject: [PATCH 047/188] Added .missingPermissions() (#756) * Added .missingPermissions() * Added .missingPermissions() * Fixed docs for .missingPermissions() * Fixed Travis CI trailing spaces? * Fixed Travis CI trailing spaces? --- src/structures/EvaluatedPermissions.js | 10 ++++++++++ src/structures/GuildMember.js | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/structures/EvaluatedPermissions.js b/src/structures/EvaluatedPermissions.js index 9deecba81..a4462692a 100644 --- a/src/structures/EvaluatedPermissions.js +++ b/src/structures/EvaluatedPermissions.js @@ -52,6 +52,16 @@ class EvaluatedPermissions { hasPermissions(permissions, explicit = false) { return permissions.map(p => this.hasPermission(p, explicit)).every(v => v); } + + /** + * Checks whether the user has all specified permissions, and lists any missing permissions. + * @param {PermissionResolvable[]} permissions The permissions to check for + * @param {boolean} [explicit=false] Whether to require the user to explicitly have the exact permissions + * @returns {array} + */ + missingPermissions(permissions, explicit = false) { + return permissions.filter(p => !this.hasPermission(p, explicit)); + } } module.exports = EvaluatedPermissions; diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index d23a9d240..305e1de94 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -253,6 +253,16 @@ class GuildMember { return permissions.map(p => this.hasPermission(p, explicit)).every(v => v); } + /** + * Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions. + * @param {PermissionResolvable[]} permissions The permissions to check for + * @param {boolean} [explicit=false] Whether to require the member to explicitly have the exact permissions + * @returns {array} + */ + missingPermissions(permissions, explicit = false) { + return permissions.filter(p => !this.hasPermission(p, explicit)); + } + /** * Edit a Guild Member * @param {GuildmemberEditData} data The data to edit the member with From c2c477834fe6b7010831b4cfb1e0da727462cd7a Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Fri, 30 Sep 2016 22:48:21 -0400 Subject: [PATCH 048/188] Add Role.setMentionable --- docs/docs.json | 2 +- src/client/rest/RESTMethods.js | 1 + src/structures/Role.js | 14 ++++++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 368ababc1..40bf0f206 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1475219507054},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":217,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":246,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":261,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":283,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":351,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":357,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":227,"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":237,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":279,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":691,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":714,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":739,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":632,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":669,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":228,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":240,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":261,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":270,"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":279,"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":288,"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":297,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":306,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":315,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":331,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":340,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":361,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":390,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":401,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":148,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":157,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":166,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":175,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":184,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":202,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":215,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":180,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":194,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":208,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":236,"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#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":249,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":275,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":257,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":271,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1475290085264},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":217,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":246,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":261,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":283,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":351,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":357,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":227,"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":237,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":279,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":691,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":714,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":739,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":632,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":669,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":228,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":240,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":261,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":270,"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":279,"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":288,"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":297,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":306,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":315,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":331,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":340,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":361,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":390,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":401,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":148,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":157,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":166,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":175,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":184,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":202,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":215,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":180,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":194,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":208,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":236,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":250,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":263,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":274,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":289,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":257,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":271,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index cce975ee3..d84ca779b 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -425,6 +425,7 @@ class RESTMethods { data.color = parseInt(data.color.replace('#', ''), 16); } data.hoist = typeof _data.hoist !== 'undefined' ? _data.hoist : role.hoist; + data.mentionable = typeof _data.mentionable !== 'undefined' ? _data.mentionable : role.mentionable; if (_data.permissions) { let perms = 0; diff --git a/src/structures/Role.js b/src/structures/Role.js index 1452eb10b..5565939a8 100644 --- a/src/structures/Role.js +++ b/src/structures/Role.js @@ -237,6 +237,20 @@ class Role { return this.client.rest.methods.updateGuildRole(this, { permissions }); } + /** + * Set whether this role is mentionable + * @param {boolean} mentionable Whether this role should be mentionable + * @returns {Promise} + * @example + * // make the role mentionable + * role.setMentionable(true) + * .then(r => console.log(`Role updated ${r}`)) + * .catch(console.error); + */ + setMentionable(mentionable) { + return this.client.rest.methods.updateGuildRole(this, { mentionable }); + } + /** * Deletes the role * @returns {Promise} From 8945344a3bc73a38b11f1a691021678ca7afff14 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Fri, 30 Sep 2016 22:51:37 -0400 Subject: [PATCH 049/188] Improve role position updating (allows for <=0) --- src/client/rest/RESTMethods.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index d84ca779b..db9dee3ed 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -419,7 +419,7 @@ class RESTMethods { return new Promise((resolve, reject) => { const data = {}; data.name = _data.name || role.name; - data.position = _data.position || role.position; + data.position = typeof _data.position !== 'undefined' ? _data.position : role.position; data.color = _data.color || role.color; if (typeof data.color === 'string' && data.color.startsWith('#')) { data.color = parseInt(data.color.replace('#', ''), 16); From a441aaf546f01f0390ded26b7f8f498645c5f511 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sat, 1 Oct 2016 01:27:11 -0400 Subject: [PATCH 050/188] Fix derp in GuildMember.kickable/bannable --- src/structures/GuildMember.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index 305e1de94..63c12e7d5 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -202,7 +202,7 @@ class GuildMember { get kickable() { if (this.user.id === this.guild.ownerID) return false; if (this.user.id === this.client.user.id) return false; - const clientMember = this.member(this.client.member); + const clientMember = this.guild.member(this.client.member); if (!clientMember.hasPermission(Constants.PermissionFlags.KICK_MEMBERS)) return false; return clientMember.highestRole.position > this.highestRole.positon; } @@ -215,7 +215,7 @@ class GuildMember { get bannable() { if (this.user.id === this.guild.ownerID) return false; if (this.user.id === this.client.user.id) return false; - const clientMember = this.member(this.client.member); + const clientMember = this.guild.member(this.client.member); if (!clientMember.hasPermission(Constants.PermissionFlags.BAN_MEMBERS)) return false; return clientMember.highestRole.position > this.highestRole.positon; } From d246982a61930aaf1e7c1e1c949c57d6b058de30 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sat, 1 Oct 2016 01:42:13 -0400 Subject: [PATCH 051/188] Fix another derp wooo --- src/structures/GuildMember.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index 63c12e7d5..f1822e946 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -202,7 +202,7 @@ class GuildMember { get kickable() { if (this.user.id === this.guild.ownerID) return false; if (this.user.id === this.client.user.id) return false; - const clientMember = this.guild.member(this.client.member); + const clientMember = this.guild.member(this.client.user); if (!clientMember.hasPermission(Constants.PermissionFlags.KICK_MEMBERS)) return false; return clientMember.highestRole.position > this.highestRole.positon; } @@ -215,7 +215,7 @@ class GuildMember { get bannable() { if (this.user.id === this.guild.ownerID) return false; if (this.user.id === this.client.user.id) return false; - const clientMember = this.guild.member(this.client.member); + const clientMember = this.guild.member(this.client.user); if (!clientMember.hasPermission(Constants.PermissionFlags.BAN_MEMBERS)) return false; return clientMember.highestRole.position > this.highestRole.positon; } From db815d4d9f3de456da3103e8ab8d020996e131c3 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sat, 1 Oct 2016 02:47:17 -0400 Subject: [PATCH 052/188] I'm gonna need more derps to fix. --- src/structures/GuildMember.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index f1822e946..f0b4dc572 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -204,7 +204,7 @@ class GuildMember { if (this.user.id === this.client.user.id) return false; const clientMember = this.guild.member(this.client.user); if (!clientMember.hasPermission(Constants.PermissionFlags.KICK_MEMBERS)) return false; - return clientMember.highestRole.position > this.highestRole.positon; + return clientMember.highestRole.position > this.highestRole.position; } /** @@ -217,7 +217,7 @@ class GuildMember { if (this.user.id === this.client.user.id) return false; const clientMember = this.guild.member(this.client.user); if (!clientMember.hasPermission(Constants.PermissionFlags.BAN_MEMBERS)) return false; - return clientMember.highestRole.position > this.highestRole.positon; + return clientMember.highestRole.position > this.highestRole.position; } /** From d1e07674b865e7bb35f96177078614d83596fc71 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sat, 1 Oct 2016 02:54:25 -0400 Subject: [PATCH 053/188] Make GuildMember.kickable/bannable take role IDs into account --- src/structures/GuildMember.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index f0b4dc572..b27ec4b6c 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -204,7 +204,10 @@ class GuildMember { if (this.user.id === this.client.user.id) return false; const clientMember = this.guild.member(this.client.user); if (!clientMember.hasPermission(Constants.PermissionFlags.KICK_MEMBERS)) return false; - return clientMember.highestRole.position > this.highestRole.position; + const clientRole = clientMember.highestRole; + const thisRole = this.highestRole; + return clientRole.position > thisRole.position || + (clientRole.position === thisRole.position && clientRole.id < thisRole.position); } /** @@ -217,7 +220,10 @@ class GuildMember { if (this.user.id === this.client.user.id) return false; const clientMember = this.guild.member(this.client.user); if (!clientMember.hasPermission(Constants.PermissionFlags.BAN_MEMBERS)) return false; - return clientMember.highestRole.position > this.highestRole.position; + const clientRole = clientMember.highestRole; + const thisRole = this.highestRole; + return clientRole.position > thisRole.position || + (clientRole.position === thisRole.position && clientRole.id < thisRole.position); } /** From 93cf34a814d985c0efa0b5518fdd13ddb725c8b2 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sat, 1 Oct 2016 02:58:32 -0400 Subject: [PATCH 054/188] I found some more. --- src/structures/GuildMember.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index b27ec4b6c..737424032 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -207,7 +207,7 @@ class GuildMember { const clientRole = clientMember.highestRole; const thisRole = this.highestRole; return clientRole.position > thisRole.position || - (clientRole.position === thisRole.position && clientRole.id < thisRole.position); + (clientRole.position === thisRole.position && clientRole.id < thisRole.id); } /** @@ -223,7 +223,7 @@ class GuildMember { const clientRole = clientMember.highestRole; const thisRole = this.highestRole; return clientRole.position > thisRole.position || - (clientRole.position === thisRole.position && clientRole.id < thisRole.position); + (clientRole.position === thisRole.position && clientRole.id < thisRole.id); } /** From 66beeb9535024b83c7a9cabb2d85629cde133719 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sat, 1 Oct 2016 03:32:08 -0400 Subject: [PATCH 055/188] Add role position comparison methods --- docs/docs.json | 2 +- src/structures/GuildMember.js | 14 +++----------- src/structures/Role.js | 22 ++++++++++++++++++++++ 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 40bf0f206..b2653ace4 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1475290085264},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":217,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":246,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":261,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":283,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":351,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":357,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":227,"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":237,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":279,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":691,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":714,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":739,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":632,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":669,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":228,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":240,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":251,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":261,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":270,"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":279,"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":288,"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":297,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":306,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":315,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":331,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":340,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":361,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":390,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":401,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":148,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":157,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":166,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":175,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":184,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":202,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":215,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":180,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":194,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":208,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":236,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":250,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":263,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":274,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":289,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":257,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":271,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1475307018387},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":217,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":246,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":261,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":283,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":351,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":357,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":227,"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":237,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":279,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":691,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":714,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":739,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":632,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":669,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":257,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":271,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index 737424032..ca96d366c 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -135,9 +135,7 @@ class GuildMember { * @readonly */ get highestRole() { - return this.roles.reduce((prev, role) => - !prev || role.position > prev.position || (role.position === prev.position && role.id < prev.id) ? role : prev - ); + return this.roles.reduce((prev, role) => !prev || role.comparePositionTo(prev) > 0 ? role : prev); } /** @@ -204,10 +202,7 @@ class GuildMember { if (this.user.id === this.client.user.id) return false; const clientMember = this.guild.member(this.client.user); if (!clientMember.hasPermission(Constants.PermissionFlags.KICK_MEMBERS)) return false; - const clientRole = clientMember.highestRole; - const thisRole = this.highestRole; - return clientRole.position > thisRole.position || - (clientRole.position === thisRole.position && clientRole.id < thisRole.id); + return clientMember.highestRole.comparePositionTo(this.highestRole) > 0; } /** @@ -220,10 +215,7 @@ class GuildMember { if (this.user.id === this.client.user.id) return false; const clientMember = this.guild.member(this.client.user); if (!clientMember.hasPermission(Constants.PermissionFlags.BAN_MEMBERS)) return false; - const clientRole = clientMember.highestRole; - const thisRole = this.highestRole; - return clientRole.position > thisRole.position || - (clientRole.position === thisRole.position && clientRole.id < thisRole.id); + return clientMember.highestRole.comparePositionTo(this.highestRole) > 0; } /** diff --git a/src/structures/Role.js b/src/structures/Role.js index 5565939a8..c0d33b4f4 100644 --- a/src/structures/Role.js +++ b/src/structures/Role.js @@ -153,6 +153,16 @@ class Role { return permissions.map(p => this.hasPermission(p, explicit)).every(v => v); } + /** + * Compares this role's position to another role's. + * @param {Role} role Role to compare to this one + * @returns {number} Negative number if the this role's position is lower (other role's is higher), + * positive number if the this one is higher (other's is lower), 0 if equal + */ + comparePositionTo(role) { + return this.constructor.comparePositions(this, role); + } + /** * Edits the role * @param {RoleData} data The new data for the role @@ -289,6 +299,18 @@ class Role { toString() { return `<@&${this.id}>`; } + + /** + * Compares the positions of two roles. + * @param {Role} role1 First role to compare + * @param {Role} role2 Second role to compare + * @returns {number} Negative number if the first role's position is lower (second role's is higher), + * positive number if the first's is higher (second's is lower), 0 if equal + */ + static comparePositions(role1, role2) { + if (role1.position === role2.position) return role1.id - role2.id; + return role1.position - role2.position; + } } module.exports = Role; From ab15c45d960d6cdc1fff4037c7c6c3377a25d91e Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 1 Oct 2016 11:21:21 +0100 Subject: [PATCH 056/188] fixed role stuff --- docs/docs.json | 2 +- src/structures/Role.js | 2 +- test/random.js | 19 ++++++++++++++++++- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 410f0ecec..6b9824be0 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1475307845589},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":217,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":246,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":261,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":283,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":351,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":357,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":227,"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":237,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":279,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":691,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":714,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":739,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":632,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":669,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":257,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":271,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1475317295611},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":217,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":246,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":261,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":283,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":351,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":357,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":227,"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":237,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":279,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":691,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":714,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":739,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.array()[0];\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":632,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":669,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":257,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":271,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file diff --git a/src/structures/Role.js b/src/structures/Role.js index c0d33b4f4..2c884c26c 100644 --- a/src/structures/Role.js +++ b/src/structures/Role.js @@ -308,7 +308,7 @@ class Role { * positive number if the first's is higher (second's is lower), 0 if equal */ static comparePositions(role1, role2) { - if (role1.position === role2.position) return role1.id - role2.id; + if (role1.position === role2.position) return role2.id - role1.id; return role1.position - role2.position; } } diff --git a/test/random.js b/test/random.js index bb003adc9..fbcb43b47 100644 --- a/test/random.js +++ b/test/random.js @@ -17,7 +17,7 @@ client.on('ready', () => { }); client.on('presenceUpdate', (o, n) => { - if (o.username.startsWith('U')) + if (o.username.startsWith('hydr')) console.log(o.username, o.presence.status, n.presence.status); }); @@ -37,6 +37,23 @@ client.on('message', message => { } } + if (message.content === 'imma queue pls') { + let count = 0; + let ecount = 0; + for(let x = 0; x < 4000; x++) { + message.channel.sendMessage(`this is message ${x} of 3999`) + .then(m => { + count++; + console.log('reached', count, ecount); + }) + .catch(m => { + console.error(m); + ecount++; + console.log('reached', count, ecount); + }); + } + } + if (message.content === 'myperms?') { message.channel.sendMessage('Your permissions are:\n' + JSON.stringify(message.channel.permissionsFor(message.author).serialize(), null, 4)); From 7c266037733ffb4df475dd5e9b49c660ee52c2cc Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 1 Oct 2016 15:27:49 +0100 Subject: [PATCH 057/188] =?UTF-8?q?Fix=20presences=20probably=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 --- .../packets/handlers/PresenceUpdate.js | 34 ++++++++++++++----- src/structures/GuildMember.js | 2 +- src/structures/Presence.js | 1 + src/util/Constants.js | 1 + test/random.js | 5 ++- 5 files changed, 31 insertions(+), 12 deletions(-) diff --git a/src/client/websocket/packets/handlers/PresenceUpdate.js b/src/client/websocket/packets/handlers/PresenceUpdate.js index 159b10753..384d6245c 100644 --- a/src/client/websocket/packets/handlers/PresenceUpdate.js +++ b/src/client/websocket/packets/handlers/PresenceUpdate.js @@ -18,6 +18,12 @@ class PresenceUpdateHandler extends AbstractHandler { } } + const oldUser = cloneObject(user); + user.patch(data.user); + if (!user.equals(oldUser)) { + client.emit(Constants.Events.USER_DETAILS_UPDATE, oldUser, user); + } + if (guild) { let member = guild.members.get(user.id); if (!member && data.status !== 'offline') { @@ -29,20 +35,32 @@ class PresenceUpdateHandler extends AbstractHandler { }, false); client.emit(Constants.Events.GUILD_MEMBER_AVAILABLE, guild, member); } - guild._setPresence(user.id, data); + if (member) { + const oldMember = cloneObject(member); + if (member.presence) { + oldMember.frozenPresence = cloneObject(member.presence); + } + guild._setPresence(user.id, data); + client.emit(Constants.Events.PRESENCE_UPDATE, oldMember, member); + } else { + guild._setPresence(user.id, data); + } } - - const oldUser = cloneObject(user); - user.patch(data.user); - client.emit(Constants.Events.PRESENCE_UPDATE, oldUser, user); } } /** - * Emitted whenever a user changes one of their details or starts/stop playing a game + * Emitted whenever a guild member's presence changes, or they change one of their details. * @event Client#presenceUpdate - * @param {User} oldUser The user before the presence update - * @param {User} newUser The user after the presence update + * @param {GuildMember} oldMember The member before the presence update + * @param {GuildMember} newMember The member after the presence update + */ + +/** + * Emitted whenever a user's details (e.g. username) are changed. + * @event Client#userUpdate + * @param {User} oldUser The user before the update + * @param {User} newUser The user after the update */ /** diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index ca96d366c..46bfd6d0f 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -107,7 +107,7 @@ class GuildMember { * @readonly */ get presence() { - return this.guild.presences.get(this.id); + return this.frozenPresence || this.guild.presences.get(this.id); } /** diff --git a/src/structures/Presence.js b/src/structures/Presence.js index 27727cfef..242c52389 100644 --- a/src/structures/Presence.js +++ b/src/structures/Presence.js @@ -3,6 +3,7 @@ */ class Presence { constructor(data) { + if (!data) return; /** * The status of the presence: * diff --git a/src/util/Constants.js b/src/util/Constants.js index 9cf3771c9..8fe6816a8 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -173,6 +173,7 @@ exports.Events = { MESSAGE_BULK_DELETE: 'messageDeleteBulk', USER_UPDATE: 'userUpdate', PRESENCE_UPDATE: 'presenceUpdate', + USER_DETAILS_UPDATE: 'userUpdate', VOICE_STATE_UPDATE: 'voiceStateUpdate', TYPING_START: 'typingStart', TYPING_STOP: 'typingStop', diff --git a/test/random.js b/test/random.js index fbcb43b47..9ad71b3a4 100644 --- a/test/random.js +++ b/test/random.js @@ -16,9 +16,8 @@ client.on('ready', () => { console.log('ready!'); }); -client.on('presenceUpdate', (o, n) => { - if (o.username.startsWith('hydr')) - console.log(o.username, o.presence.status, n.presence.status); +client.on('userUpdate', (o, n) => { + console.log(o.username, n.username); }); client.on('channelCreate', channel => { From 530035e14ba0aba613627ffec2de5d04c282e611 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 1 Oct 2016 20:21:28 +0100 Subject: [PATCH 058/188] Fix stacked heartbeats on reconnect and fix documentation --- docs/docs.json | 2 +- src/client/actions/UserUpdate.js | 7 ------- src/client/websocket/WebSocketManager.js | 1 + src/client/websocket/packets/handlers/PresenceUpdate.js | 2 +- src/util/Constants.js | 1 - 5 files changed, 3 insertions(+), 10 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 6b9824be0..b49d3a033 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1475317295611},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":217,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":246,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":261,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":283,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event: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:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":351,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":357,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":41,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":48,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":227,"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":237,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":279,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":691,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":714,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":739,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.array()[0];\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":632,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":669,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":34,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":15,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":21,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":46,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":81,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":64,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":72,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":257,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":271,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1475349697813},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":217,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":246,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":261,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":283,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":351,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":357,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":228,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":238,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":280,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":691,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":714,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":739,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.array()[0];\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":632,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":669,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":257,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":271,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file diff --git a/src/client/actions/UserUpdate.js b/src/client/actions/UserUpdate.js index 005465cb9..b361eca59 100644 --- a/src/client/actions/UserUpdate.js +++ b/src/client/actions/UserUpdate.js @@ -30,11 +30,4 @@ 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 16c61e90e..ffc6b2358 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -192,6 +192,7 @@ class WebSocketManager extends EventEmitter { * Emitted whenever the client websocket is disconnected * @event Client#disconnect */ + clearInterval(this.client.manager.heartbeatInterval); if (!this.reconnecting) this.client.emit(Constants.Events.DISCONNECT); if (event.code === 4004) return; if (event.code === 4010) return; diff --git a/src/client/websocket/packets/handlers/PresenceUpdate.js b/src/client/websocket/packets/handlers/PresenceUpdate.js index 384d6245c..531855b48 100644 --- a/src/client/websocket/packets/handlers/PresenceUpdate.js +++ b/src/client/websocket/packets/handlers/PresenceUpdate.js @@ -21,7 +21,7 @@ class PresenceUpdateHandler extends AbstractHandler { const oldUser = cloneObject(user); user.patch(data.user); if (!user.equals(oldUser)) { - client.emit(Constants.Events.USER_DETAILS_UPDATE, oldUser, user); + client.emit(Constants.Events.USER_UPDATE, oldUser, user); } if (guild) { diff --git a/src/util/Constants.js b/src/util/Constants.js index 8fe6816a8..9cf3771c9 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -173,7 +173,6 @@ exports.Events = { MESSAGE_BULK_DELETE: 'messageDeleteBulk', USER_UPDATE: 'userUpdate', PRESENCE_UPDATE: 'presenceUpdate', - USER_DETAILS_UPDATE: 'userUpdate', VOICE_STATE_UPDATE: 'voiceStateUpdate', TYPING_START: 'typingStart', TYPING_STOP: 'typingStop', From 34168eb832f265467620abe690ea0a902bf935f9 Mon Sep 17 00:00:00 2001 From: Programmix Date: Sat, 1 Oct 2016 12:29:15 -0700 Subject: [PATCH 059/188] Create MessageCollector.next (#761) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allows using await with message collectors (ES7) Hydrabolt approved™ --- src/structures/MessageCollector.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/structures/MessageCollector.js b/src/structures/MessageCollector.js index 81956faa6..b7395dbb0 100644 --- a/src/structures/MessageCollector.js +++ b/src/structures/MessageCollector.js @@ -92,6 +92,34 @@ class MessageCollector extends EventEmitter { return false; } + /** + * Returns a promise that resolves when a valid message is sent. Rejects + * with collected messages if the Collector ends before receiving a message. + * @type {Promise} + * @readonly + */ + get next() { + return new Promise((resolve, reject) => { + const cleanup = () => { + this.removeListener(onMessage); + this.removeListener(onEnd); + }; + + const onMessage = (...args) => { + cleanup(); + resolve(...args); + }; + + const onEnd = (...args) => { + cleanup(); + reject(...args); + }; + + this.once('message', onMessage); + this.once('end', onEnd); + }); + } + /** * Stops the collector and emits `end`. * @param {string} [reason='user'] An optional reason for stopping the collector From 1fcc618532fb8cf833e0c400f263af3cc91a0892 Mon Sep 17 00:00:00 2001 From: Programmix Date: Sat, 1 Oct 2016 13:22:32 -0700 Subject: [PATCH 060/188] Fix removeListener call (#762) --- src/structures/MessageCollector.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/structures/MessageCollector.js b/src/structures/MessageCollector.js index b7395dbb0..2b847922e 100644 --- a/src/structures/MessageCollector.js +++ b/src/structures/MessageCollector.js @@ -101,8 +101,8 @@ class MessageCollector extends EventEmitter { get next() { return new Promise((resolve, reject) => { const cleanup = () => { - this.removeListener(onMessage); - this.removeListener(onEnd); + this.removeListener('message', onMessage); + this.removeListener('end', onEnd); }; const onMessage = (...args) => { From c286c1443f67ea1e4f86d378a79aae3f568bb6a4 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 1 Oct 2016 22:23:00 +0100 Subject: [PATCH 061/188] voice rewrite part 1 --- src/client/voice/ClientVoiceManager.js | 219 ++++++++++++++---- .../packets/handlers/VoiceServerUpdate.js | 4 +- .../packets/handlers/VoiceStateUpdate.js | 4 +- 3 files changed, 183 insertions(+), 44 deletions(-) diff --git a/src/client/voice/ClientVoiceManager.js b/src/client/voice/ClientVoiceManager.js index bf9f99bdb..09b23c637 100644 --- a/src/client/voice/ClientVoiceManager.js +++ b/src/client/voice/ClientVoiceManager.js @@ -2,6 +2,135 @@ const Collection = require('../../util/Collection'); const mergeDefault = require('../../util/MergeDefault'); const Constants = require('../../util/Constants'); const VoiceConnection = require('./VoiceConnection'); +const EventEmitter = require('events').EventEmitter; + +/** + * Represents a Pending Voice Connection + * @private + */ +class PendingVoiceConnection extends EventEmitter { + constructor(voiceManager, channel) { + super(); + /** + * The ClientVoiceManager that instantiated this pending connection + * @type {ClientVoiceManager} + */ + this.voiceManager = voiceManager; + /** + * The channel that this pending voice connection will attempt to join + * @type {VoiceChannel} + */ + this.channel = channel; + /** + * The timeout that will be invoked after 15 seconds signifying a failure to connect + * @type {Timeout} + */ + this.deathTimer = this.voiceManager.client.setTimeout( + () => this.fail(new Error('Automatic failure after 15 seconds')), 15000); + /** + * An object containing data required to connect to the voice servers with + * @type {object} + */ + this.data = {}; + + this.sendVoiceStateUpdate(); + } + + checkReady() { + if (this.data.token && this.data.endpoint && this.data.session_id) { + this.pass(); + return true; + } else { + return false; + } + } + + /** + * Set the token and endpoint required to connect to the the voice servers + * @param {string} token the token + * @param {string} endpoint the endpoint + * @returns {void} + */ + setTokenAndEndpoint(token, endpoint) { + if (!token) { + this.fail(new Error('Token not provided from voice server packet')); + return; + } + if (!endpoint) { + this.fail(new Error('Endpoint not provided from voice server packet')); + return; + } + if (this.data.token) { + this.fail(new Error('There is already a registered token for this connection')); + return; + } + if (this.data.endpoint) { + this.fail(new Error('There is already a registered endpoint for this connection')); + return; + } + + endpoint = endpoint.match(/([^:]*)/)[0]; + + if (!endpoint) { + this.fail(new Error('failed to find an endpoint')); + return; + } + + this.data.token = token; + this.data.endpoint = endpoint; + + this.checkReady(); + } + + /** + * Sets the Session ID for the connection + * @param {string} sessionID the session ID + */ + setSessionID(sessionID) { + if (!sessionID) { + this.fail(new Error('Session ID not supplied')); + return; + } + if (this.data.session_id) { + this.fail(new Error('There is already a registered session ID for this connection')); + return; + } + this.data.session_id = sessionID; + + this.checkReady(); + } + + clean() { + clearInterval(this.deathTimer); + this.emit('fail', new Error('Clean-up triggered :fourTriggered:')); + } + + pass() { + clearInterval(this.deathTimer); + this.emit('pass', this.upgrade()); + } + + fail(reason) { + this.emit('fail', reason); + this.clean(); + } + + sendVoiceStateUpdate() { + try { + this.voiceManager.sendVoiceStateUpdate(this.channel); + } catch (error) { + this.fail(error); + } + } + + /** + * Upgrades this Pending Connection to a full Voice Connection + * @returns {VoiceConnection} + */ + upgrade() { + return new VoiceConnection(this); + } +} /** * Manages all the voice stuff for the Client @@ -26,6 +155,9 @@ class ClientVoiceManager { * @type {Collection} */ this.pending = new Collection(); + + this.client.on('self.voiceServer', this.onVoiceServer.bind(this)); + this.client.on('self.voiceStateUpdate', this.onVoiceStateUpdate.bind(this)); } /** @@ -47,31 +179,16 @@ 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 - */ - _receivedVoiceServer(guildID, token, endpoint) { - const pendingRequest = this.pending.get(guildID); - if (!pendingRequest) throw new Error('Guild not pending.'); - pendingRequest.token = token; - // remove the port otherwise it errors ¯\_(ツ)_/¯ - pendingRequest.endpoint = endpoint.match(/([^:]*)/)[0]; - this._checkPendingReady(guildID); + onVoiceServer(data) { + if (this.pending.has(data.guild_id)) { + this.pending.get(data.guild_id).setTokenAndEndpoint(data.token, data.endpoint); + } } - /** - * 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); + onVoiceStateUpdate(data) { + if (this.pending.has(data.guild_id)) { + this.pending.get(data.guild_id).setSessionID(data.session_id); + } } /** @@ -79,13 +196,31 @@ class ClientVoiceManager { * @param {VoiceChannel} channel The channel to join * @param {Object} [options] The options to provide */ - _sendWSJoin(channel, options = {}) { + sendVoiceStateUpdate(channel, options = {}) { + if (!this.client.user) { + throw new Error('You cannot join because there is no client user'); + } + + if (channel.permissionsFor) { + const permissions = channel.permissionsFor(this.client.user); + if (permissions) { + if (!permissions.hasPermission('CONNECT')) { + throw new Error('You do not have permission to connect to this voice channel'); + } + } else { + throw new Error('There is no permission set for the client user in this channel - are they part of the guild?'); + } + } else { + throw new Error('Channel does not support permissionsFor; is it really a voice channel?'); + } + 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, @@ -99,26 +234,32 @@ class ClientVoiceManager { */ joinChannel(channel) { return new Promise((resolve, reject) => { - if (this.pending.get(channel.guild.id)) throw new Error(`Already connecting to a channel in guild.`); - const existingConn = this.connections.get(channel.guild.id); - if (existingConn) { - if (existingConn.channel.id !== channel.id) { - this._sendWSJoin(channel); + // if already connecting to this voice server, error + if (this.pending.get(channel.guild.id)) { + throw new Error(`Already connecting to this guild's voice server.`); + } + + const existingConnection = this.connections.get(channel.guild.id); + if (existingConnection) { + if (existingConnection.channel.id !== channel.id) { + this.sendVoiceStateUpdate(channel); this.connections.get(channel.guild.id).channel = channel; } - resolve(existingConn); + resolve(existingConnection); return; } - this.pending.set(channel.guild.id, { - channel, - sessionID: null, - token: null, - endpoint: null, - resolve, - reject, + + const pendingConnection = new PendingVoiceConnection(this, channel); + this.pending.set(channel.guild.id, pendingConnection); + + pendingConnection.on('fail', reason => { + this.pending.delete(channel.guild.id); + reject(reason); + }); + + pendingConnection.on('pass', voiceConnection => { + // do stuff }); - this._sendWSJoin(channel); - this.client.setTimeout(() => reject(new Error('Connection not established within 15 seconds.')), 15000); }); } } diff --git a/src/client/websocket/packets/handlers/VoiceServerUpdate.js b/src/client/websocket/packets/handlers/VoiceServerUpdate.js index 108d54ccc..97885d6cd 100644 --- a/src/client/websocket/packets/handlers/VoiceServerUpdate.js +++ b/src/client/websocket/packets/handlers/VoiceServerUpdate.js @@ -12,9 +12,7 @@ class VoiceServerUpdate extends AbstractHandler { handle(packet) { const client = this.packetManager.client; const data = packet.d; - if (client.voice.pending.has(data.guild_id) && data.endpoint) { - client.voice._receivedVoiceServer(data.guild_id, data.token, data.endpoint); - } + client.emit('self.voiceServer', data); } } diff --git a/src/client/websocket/packets/handlers/VoiceStateUpdate.js b/src/client/websocket/packets/handlers/VoiceStateUpdate.js index 639da210b..ddbfbfcbd 100644 --- a/src/client/websocket/packets/handlers/VoiceStateUpdate.js +++ b/src/client/websocket/packets/handlers/VoiceStateUpdate.js @@ -20,8 +20,8 @@ class VoiceStateUpdateHandler extends AbstractHandler { // 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); + if (member.user.id === client.user.id && data.channel_id) { + client.emit('self.voiceStateUpdate', data); } const newChannel = client.channels.get(data.channel_id); From d35372d3e979ce88b292d5bbada48183ca17839d Mon Sep 17 00:00:00 2001 From: Programmix Date: Sat, 1 Oct 2016 21:23:35 -0700 Subject: [PATCH 062/188] Fix MessageCollector.next edge case (#765) --- src/structures/MessageCollector.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/structures/MessageCollector.js b/src/structures/MessageCollector.js index 2b847922e..48234d4a4 100644 --- a/src/structures/MessageCollector.js +++ b/src/structures/MessageCollector.js @@ -100,6 +100,11 @@ class MessageCollector extends EventEmitter { */ get next() { return new Promise((resolve, reject) => { + if (this.ended) { + reject(this.collected); + return; + } + const cleanup = () => { this.removeListener('message', onMessage); this.removeListener('end', onEnd); From 51f30d6e4cbe2c4a5d40c3aae471150d92d7ea0a Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sun, 2 Oct 2016 01:51:10 -0400 Subject: [PATCH 063/188] Add nickname mention format to GuildMember.toString --- src/structures/GuildMember.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index 46bfd6d0f..c296aaab4 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -407,7 +407,7 @@ class GuildMember { * console.log(`Hello from ${member}!`); */ toString() { - return String(this.user); + return `<@${this.nickname ? '!' : ''}${this.user.id}>`; } // These are here only for documentation purposes - they are implemented by TextBasedChannel From e201e9080f1582028b05c0af36fc8e97ddaf6d40 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 2 Oct 2016 14:59:05 +0100 Subject: [PATCH 064/188] start rewriting voice websocket --- src/client/voice/ClientVoiceManager.js | 3 +- src/client/voice/VoiceConnection.js | 270 ++----------------- src/client/voice/VoiceConnectionUDPClient.js | 72 ----- src/client/voice/VoiceConnectionWebSocket.js | 113 -------- src/client/voice/VoiceWebSocket.js | 169 ++++++++++++ 5 files changed, 194 insertions(+), 433 deletions(-) delete mode 100644 src/client/voice/VoiceConnectionWebSocket.js create mode 100644 src/client/voice/VoiceWebSocket.js diff --git a/src/client/voice/ClientVoiceManager.js b/src/client/voice/ClientVoiceManager.js index 09b23c637..da089c945 100644 --- a/src/client/voice/ClientVoiceManager.js +++ b/src/client/voice/ClientVoiceManager.js @@ -258,7 +258,8 @@ class ClientVoiceManager { }); pendingConnection.on('pass', voiceConnection => { - // do stuff + this.pending.delete(channel.guild.id); + this.connections.set(channel.guild.id, voiceConnection); }); }); } diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index bde83f060..cc1205d85 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -1,5 +1,5 @@ -const VoiceConnectionWebSocket = require('./VoiceConnectionWebSocket'); -const VoiceConnectionUDPClient = require('./VoiceConnectionUDPClient'); +const VoiceWebSocket = require('./VoiceConnectionWebSocket'); +const VoiceUDP = require('./VoiceConnectionUDPClient'); const VoiceReceiver = require('./receiver/VoiceReceiver'); const Constants = require('../../util/Constants'); const EventEmitter = require('events').EventEmitter; @@ -16,269 +16,45 @@ const DefaultPlayer = require('./player/DefaultPlayer'); * @extends {EventEmitter} */ class VoiceConnection extends EventEmitter { - constructor(manager, channel, token, sessionID, endpoint, resolve, reject) { + + constructor(pendingConnection) { super(); - /** - * The voice manager of this connection + * The Voice Manager that instantiated this connection * @type {ClientVoiceManager} - * @private */ - this.manager = manager; + this.voiceManager = pendingConnection.voiceManager; /** - * The player - * @type {BasePlayer} - */ - this.player = new DefaultPlayer(this); - - /** - * The endpoint of the connection - * @type {string} - */ - this.endpoint = endpoint; - - /** - * The VoiceChannel for this connection + * The voice channel this connection is currently serving * @type {VoiceChannel} */ - this.channel = channel; + this.channel = pendingConnection.channel; /** - * The WebSocket connection for this voice connection - * @type {VoiceConnectionWebSocket} - * @private + * The authentication data needed to connect to the voice server + * @type {object} */ - this.websocket = new VoiceConnectionWebSocket(this, channel.guild.id, token, sessionID, endpoint); + this.authentication = pendingConnection.data; /** - * Whether or not the connection is ready - * @type {boolean} + * Object that wraps contains the `ws` and `udp` sockets of this voice connection + * @type {object} */ - 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.ssrcMap = new Map(); - this.queue = []; - this.receivers = []; - this.bindListeners(); + this.sockets = {}; } - /** - * Executed whenever an error occurs with the UDP/WebSocket sub-client. - * @private - * @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 - */ - this.emit('error', err); - this._shutdown(err); + connect() { + if (this.sockets.ws) { + throw new Error('There is already an existing WebSocket connection!'); + } + if (this.sockets.udp) { + throw new Error('There is already an existing UDP connection!'); + } + this.sockets.ws = new VoiceWebSocket(this); + this.sockets.udp = new VoiceUDP(this); } - /** - * Disconnects the Client from the Voice Channel. - * @param {string} [reason='user requested'] The reason of the disconnection - */ - 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, - }, - }); - this._shutdown(reason); - } - - _onClose(e) { - e = e && e.code === 1000 ? null : e; - return this._shutdown(e); - } - - _shutdown(e) { - if (!this.ready) return; - this.ready = false; - this.websocket._shutdown(); - this.player._shutdown(); - if (this.udp) this.udp._shutdown(); - if (this._vsUpdateListener) this.manager.client.removeListener('voiceStateUpdate', this._vsUpdateListener); - /** - * Emit once the voice connection has disconnected. - * @event VoiceConnection#disconnected - * @param {Error} error The encountered error, if any - */ - this.emit('disconnected', e); - } - - /** - * Binds listeners to the WebSocket and UDP sub-clients. - * @private - */ - 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.data = data; - this.udp.on('error', err => this._onError(err)); - this.udp.on('close', err => this._onClose(err)); - }); - 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._resolve(this); - this.emit('ready'); - }); - this.once('ready', () => { - setImmediate(() => { - for (const item of this.queue) this.emit(...item); - this.queue = []; - }); - }); - this._vsUpdateListener = (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.manager.client.on(Constants.Events.VOICE_STATE_UPDATE, this._vsUpdateListener); - this.websocket.on('speaking', data => { - const guild = this.channel.guild; - 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); - }); - } - - /** - * Options that can be passed to stream-playing methods: - * @typedef {Object} StreamOptions - * @property {number} [seek=0] The time to seek to - * @property {number} [volume=1] The volume to play at - * @property {number} [passes=1] How many times to send the voice packet to reduce packet loss - */ - - /** - * Play the given file in the voice connection. - * @param {string} file The path to the file - * @param {StreamOptions} [options] Options for playing the stream - * @returns {StreamDispatcher} - * @example - * // play files natively - * voiceChannel.join() - * .then(connection => { - * const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3'); - * }) - * .catch(console.error); - */ - playFile(file, { seek = 0, volume = 1, passes = 1 } = {}) { - const options = { seek, volume, passes }; - return this.player.playFile(file, options); - } - - /** - * Plays and converts an audio stream in the voice connection. - * @param {ReadableStream} stream The audio stream to play - * @param {StreamOptions} [options] Options for playing the stream - * @returns {StreamDispatcher} - * @example - * // play streams using ytdl-core - * const ytdl = require('ytdl-core'); - * const streamOptions = { seek: 0, volume: 1 }; - * voiceChannel.join() - * .then(connection => { - * const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'}); - * const dispatcher = connection.playStream(stream, streamOptions); - * }) - * .catch(console.error); - */ - playStream(stream, { seek = 0, volume = 1, passes = 1 } = {}) { - const options = { seek, volume, passes }; - return this.player.playStream(stream, options); - } - - /** - * Plays a stream of 16-bit signed stereo PCM at 48KHz. - * @param {ReadableStream} stream The audio stream to play. - * @param {StreamOptions} [options] Options for playing the stream - * @returns {StreamDispatcher} - */ - playConvertedStream(stream, { seek = 0, volume = 1, passes = 1 } = {}) { - const options = { seek, volume, passes }; - this.player._shutdown(); - return this.player.playPCMStream(stream, options); - } - - /** - * Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these. - * @returns {VoiceReceiver} - */ - createReceiver() { - const rcv = new VoiceReceiver(this); - this.receivers.push(rcv); - return rcv; - } } module.exports = VoiceConnection; diff --git a/src/client/voice/VoiceConnectionUDPClient.js b/src/client/voice/VoiceConnectionUDPClient.js index add7b9c4f..118c55a9a 100644 --- a/src/client/voice/VoiceConnectionUDPClient.js +++ b/src/client/voice/VoiceConnectionUDPClient.js @@ -6,78 +6,6 @@ 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) { - this.emit('error', err); - return; - } - this.connectUDP(address); - }); - } - - send(packet) { - if (this.udpSocket) { - try { - this.udpSocket.send(packet, 0, packet.length, this.data.port, this.udpIP); - } catch (err) { - this.emit('error', err); - } - } - } - - _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'); - - // 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 }); - }); - 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 deleted file mode 100644 index fdb0fe0f7..000000000 --- a/src/client/voice/VoiceConnectionWebSocket.js +++ /dev/null @@ -1,113 +0,0 @@ -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.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); - } - - send(data) { - if (this.ws.readyState === WebSocket.OPEN) this.ws.send(JSON.stringify(data)); - } - - _shutdown() { - if (this.ws) this.ws.close(); - this.voiceConnection.manager.client.clearInterval(this.heartbeat); - } - - _onOpen() { - this.opened = true; - 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, - }, - }); - } - - _onClose(err) { - if (!this.opened && this.attempts >= 0) { - this.setupWS(); - return; - } - this.emit('close', err); - } - - _onError(e) { - if (!this.opened && this.attempts >= 0) { - this.setupWS(); - return; - } - this.emit('error', e); - } - - _setHeartbeat(interval) { - this.heartbeat = this.voiceConnection.manager.client.setInterval(() => { - this.send({ - op: Constants.VoiceOPCodes.HEARTBEAT, - d: null, - }); - }, interval); - this.send({ - op: Constants.VoiceOPCodes.HEARTBEAT, - d: null, - }); - } - - _onMessage(event) { - let packet; - try { - packet = JSON.parse(event.data); - } catch (error) { - this._onError(error); - return; - } - - 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: - 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', 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); - break; - } - } -} - -module.exports = VoiceConnectionWebSocket; diff --git a/src/client/voice/VoiceWebSocket.js b/src/client/voice/VoiceWebSocket.js new file mode 100644 index 000000000..2af84a1b8 --- /dev/null +++ b/src/client/voice/VoiceWebSocket.js @@ -0,0 +1,169 @@ +const WebSocket = require('ws'); +const Constants = require('../../util/Constants'); +const EventEmitter = require('events').EventEmitter; + +/** + * Represents a Voice Connection's WebSocket + * @extends {EventEmitter} + * @private + */ +class VoiceWebSocket extends EventEmitter { + constructor(voiceConnection) { + super(); + /** + * The Voice Connection that this WebSocket serves + * @type {VoiceConnection} + */ + this.voiceConnection = voiceConnection; + } + + /** + * The client of this voice websocket + * @type {Client} + * @readonly + */ + get client() { + return this.voiceConnection.voiceManager.client; + } + + /** + * Starts connecting to the Voice WebSocket Server. + */ + connect() { + if (this.ws) { + throw new Error('there is already an existing websocket'); + } + /** + * The actual WebSocket used to connect to the Voice WebSocket Server. + * @type {WebSocket} + */ + this.ws = new WebSocket(`wss://${this.voiceConnection.authentication.endpoint}`); + this.ws.onopen = this.onOpen.bind(this); + this.ws.onmessage = this.onMessage.bind(this); + this.ws.onclose = this.onClose.bind(this); + this.ws.onerror = this.onError.bind(this); + } + + /** + * Sends data to the WebSocket if it is open. + * @param {string} data the data to send to the WebSocket + * @returns {Promise} + */ + send(data) { + return new Promise((resolve, reject) => { + if (this.ws.readyState === WebSocket.OPEN) { + this.ws.send(data, null, error => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + } else { + reject(new Error('websocket not open')); + } + }); + } + + /** + * JSON.stringify's a packet and then sends it to the WebSocket Server. + * @param {Object} packet the packet to send + * @returns {Promise} + */ + sendPacket(packet) { + try { + packet = JSON.stringify(packet); + } catch (error) { + return Promise.reject(error); + } + return this.send(packet); + } + + /** + * Called whenever the WebSocket opens + */ + onOpen() { + this.sendPacket({ + op: Constants.OPCodes.DISPATCH, + d: { + server_id: this.voiceConnection.channel.guild.id, + user_id: this.client.user.id, + token: this.voiceConnection.authentication.token, + session_id: this.voiceConnection.authentication.session_id, + }, + }).catch(() => { + this.emit('error', new Error('tried to send join packet but WebSocket not open')); + }); + } + + /** + * Called whenever a message is received from the WebSocket + * @param {MessageEvent} event the message event that was received + * @returns {void} + */ + onMessage(event) { + try { + return this.onPacket(JSON.stringify(event.data)); + } catch (error) { + return this.onError(error); + } + } + + /** + * Called whenever a valid packet is received from the WebSocket + * @param {Object} packet the received packet + */ + onPacket(packet) { + switch (packet.op) { + case Constants.VoiceOPCodes.READY: + this.setHeartbeat(packet.d.heartbeat_interval); + break; + } + } + + /** + * Sets an interval at which to send a heartbeat packet to the WebSocket + * @param {number} interval the interval at which to send a heartbeat packet + */ + setHeartbeat(interval) { + if (!interval || isNaN(interval)) { + this.onError(new Error('tried to set voice heartbeat but no valid interval was specified')); + return; + } + if (this.heartbeatInterval) { + /** + * Emitted whenver the voice websocket encounters a non-fatal error + * @param {string} warn the warning + * @event VoiceWebSocket#warn + */ + this.emit('warn', 'a voice heartbeat interval is being overwritten'); + clearInterval(this.heartbeatInterval); + } + this.heartbeatInterval = this.client.setInterval(this.sendHeartbeat.bind(this), interval); + } + + /** + * Clears a heartbeat interval, if one exists + */ + clearHeartbeat() { + if (!this.heartbeatInterval) { + this.emit('warn', 'tried to clear a heartbeat interval that does not exist'); + return; + } + clearInterval(this.heartbeatInterval); + this.heartbeatInterval = null; + } + + /** + * Sends a heartbeat packet + */ + sendHeartbeat() { + this.sendPacket({ op: Constants.VoiceOPCodes.HEARTBEAT }) + .catch(() => { + this.emit('warn', 'tried to send heartbeat, but connection is not open'); + this.clearHeartbeat(); + }); + } +} + +module.exports = VoiceWebSocket; From ed8b79aa4605c500fa563c3bcd43b7d01c4b91c9 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 2 Oct 2016 15:12:43 +0100 Subject: [PATCH 065/188] Add session description and speaking listeners --- src/client/voice/VoiceWebSocket.js | 7 +++++++ src/client/voice/util/SecretKey.js | 10 ++++++++++ 2 files changed, 17 insertions(+) create mode 100644 src/client/voice/util/SecretKey.js diff --git a/src/client/voice/VoiceWebSocket.js b/src/client/voice/VoiceWebSocket.js index 2af84a1b8..551941689 100644 --- a/src/client/voice/VoiceWebSocket.js +++ b/src/client/voice/VoiceWebSocket.js @@ -1,5 +1,6 @@ const WebSocket = require('ws'); const Constants = require('../../util/Constants'); +const SecretKey = require('./util/SecretKey'); const EventEmitter = require('events').EventEmitter; /** @@ -118,6 +119,12 @@ class VoiceWebSocket extends EventEmitter { case Constants.VoiceOPCodes.READY: this.setHeartbeat(packet.d.heartbeat_interval); break; + case Constants.VoiceOPCodes.SESSION_DESCRIPTION: + this.emit('sessionDescription', packet.d.mode, new SecretKey(packet.d.secret_key)); + break; + case Constants.VoiceOPCodes.SPEAKING: + this.emit('speaking', packet.d); + break; } } diff --git a/src/client/voice/util/SecretKey.js b/src/client/voice/util/SecretKey.js new file mode 100644 index 000000000..50debd8c8 --- /dev/null +++ b/src/client/voice/util/SecretKey.js @@ -0,0 +1,10 @@ +class SecretKey { + constructor(key) { + this.key = new Uint8Array(new ArrayBuffer(key.length)); + for (const index in key) { + this.key[index] = key[index]; + } + } +} + +module.exports = SecretKey; From 2bb6ecdc28df2797445c054a99e59aefb1146227 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 2 Oct 2016 15:16:54 +0100 Subject: [PATCH 066/188] documentation --- src/client/voice/VoiceWebSocket.js | 19 +++++++++++++++++++ src/client/voice/util/SecretKey.js | 7 +++++++ 2 files changed, 26 insertions(+) diff --git a/src/client/voice/VoiceWebSocket.js b/src/client/voice/VoiceWebSocket.js index 551941689..63346aaa9 100644 --- a/src/client/voice/VoiceWebSocket.js +++ b/src/client/voice/VoiceWebSocket.js @@ -120,11 +120,30 @@ class VoiceWebSocket extends EventEmitter { this.setHeartbeat(packet.d.heartbeat_interval); break; case Constants.VoiceOPCodes.SESSION_DESCRIPTION: + /** + * Emitted once the Voice Websocket receives a description of this voice session + * @param {string} encryptionMode the type of encryption being used + * @param {SecretKey} secretKey the secret key used for encryption + * @event VoiceWebSocket#sessionDescription + */ this.emit('sessionDescription', packet.d.mode, new SecretKey(packet.d.secret_key)); break; case Constants.VoiceOPCodes.SPEAKING: + /** + * Emitted whenever a speaking packet is received + * @param {Object} data + * @event VoiceWebSocket#speaking + */ this.emit('speaking', packet.d); break; + default: + /** + * Emitted when an unhandled packet is received + * @param {Object} packet + * @event VoiceWebSocket#unknownPacket + */ + this.emit('unknownPacket', packet); + break; } } diff --git a/src/client/voice/util/SecretKey.js b/src/client/voice/util/SecretKey.js index 50debd8c8..5e1df7a99 100644 --- a/src/client/voice/util/SecretKey.js +++ b/src/client/voice/util/SecretKey.js @@ -1,5 +1,12 @@ +/** + * Represents a Secret Key used in encryption over voice + */ class SecretKey { constructor(key) { + /** + * The key used for encryption + * @type {Uint8Array} + */ this.key = new Uint8Array(new ArrayBuffer(key.length)); for (const index in key) { this.key[index] = key[index]; From 77e37b62ef24928619bbdfb1b8460d32344d08ac Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sun, 2 Oct 2016 11:14:32 -0400 Subject: [PATCH 067/188] Fix sendMessage with no content and split/disableEveryone --- src/client/rest/RESTMethods.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index db9dee3ed..4d0cc6271 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -51,11 +51,13 @@ class RESTMethods { return new Promise((resolve, reject) => { if (typeof content !== 'undefined') content = this.rest.client.resolver.resolveString(content); - if (disableEveryone || (typeof disableEveryone === 'undefined' && this.rest.client.options.disableEveryone)) { - content = content.replace('@everyone', '@\u200beveryone').replace('@here', '@\u200bhere'); - } + if (content) { + if (disableEveryone || (typeof disableEveryone === 'undefined' && this.rest.client.options.disableEveryone)) { + content = content.replace('@everyone', '@\u200beveryone').replace('@here', '@\u200bhere'); + } - if (split) content = splitMessage(content, typeof split === 'object' ? split : {}); + if (split) content = splitMessage(content, typeof split === 'object' ? split : {}); + } if (channel instanceof User || channel instanceof GuildMember) { this.createDM(channel).then(chan => { From c75782781bad514b93ef4ffc2c520be439b4b747 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 2 Oct 2016 16:51:40 +0100 Subject: [PATCH 068/188] finish up voice websocket for now --- src/client/voice/VoiceWebSocket.js | 48 +++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/src/client/voice/VoiceWebSocket.js b/src/client/voice/VoiceWebSocket.js index 63346aaa9..3cb0d1541 100644 --- a/src/client/voice/VoiceWebSocket.js +++ b/src/client/voice/VoiceWebSocket.js @@ -16,6 +16,11 @@ class VoiceWebSocket extends EventEmitter { * @type {VoiceConnection} */ this.voiceConnection = voiceConnection; + /** + * How many connection attempts have been made + * @type {number} + */ + this.attempts = 0; } /** @@ -27,13 +32,31 @@ class VoiceWebSocket extends EventEmitter { return this.voiceConnection.voiceManager.client; } + /** + * Resets the current WebSocket + */ + reset() { + if (this.ws) { + if (this.ws.readyState !== WebSocket.CLOSED) { + this.ws.close(); + } + this.ws = null; + } + this.clearHeartbeat(); + } + /** * Starts connecting to the Voice WebSocket Server. */ connect() { if (this.ws) { - throw new Error('there is already an existing websocket'); + this.reset(); } + if (this.attempts > 5) { + this.emit('error', new Error(`too many connection attempts (${this.attempts})`)); + return; + } + this.attempts++; /** * The actual WebSocket used to connect to the Voice WebSocket Server. * @type {WebSocket} @@ -110,6 +133,23 @@ class VoiceWebSocket extends EventEmitter { } } + /** + * Called whenever the connection to the WebSocket Server is lost + * @param {CloseEvent} event the close event + */ + onClose(event) { + // #todo see if the connection is open before reconnecting + this.client.setTimeout(this.connect.bind(this), this.attempts * 1000); + } + + /** + * Called whenever an error occurs with the WebSocket. + * @param {Error} error the error that occurred + */ + onError(error) { + this.emit('error', error); + } + /** * Called whenever a valid packet is received from the WebSocket * @param {Object} packet the received packet @@ -118,6 +158,12 @@ class VoiceWebSocket extends EventEmitter { switch (packet.op) { case Constants.VoiceOPCodes.READY: this.setHeartbeat(packet.d.heartbeat_interval); + /** + * Emitted once the voice websocket receives the ready packet + * @param {Object} packet the received packet + * @event VoiceWebSocket#ready + */ + this.emit('ready', packet.d); break; case Constants.VoiceOPCodes.SESSION_DESCRIPTION: /** From 57a418399bcd3bf18e16b79599a98ee3dbab4e5c Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 2 Oct 2016 17:28:48 +0100 Subject: [PATCH 069/188] start some stuff on UDP --- src/client/voice/VoiceConnectionUDPClient.js | 125 ++++++++++++++++++- 1 file changed, 124 insertions(+), 1 deletion(-) diff --git a/src/client/voice/VoiceConnectionUDPClient.js b/src/client/voice/VoiceConnectionUDPClient.js index 118c55a9a..93c0a1c6a 100644 --- a/src/client/voice/VoiceConnectionUDPClient.js +++ b/src/client/voice/VoiceConnectionUDPClient.js @@ -3,9 +3,132 @@ const dns = require('dns'); const Constants = require('../../util/Constants'); const EventEmitter = require('events').EventEmitter; +function parseLocalPacket(message) { + try { + const packet = new Buffer(message); + let address = ''; + for (let i = 4; i < packet.indexOf(0, i); i++) { + address += String.fromCharCode(packet[i]); + } + const port = parseInt(packet.readUIntLE(packet.length - 2, 2).toString(10), 10); + return { address, port }; + } catch (error) { + return { error }; + } +} + +/** + * Represents a UDP Client for a Voice Connection + * @extends {EventEmitter} + */ class VoiceConnectionUDPClient extends EventEmitter { - constructor(voiceConnection, data) { + constructor(voiceConnection) { super(); + /** + * The voice connection that this UDP client serves + * @type {VoiceConnection} + */ + this.voiceConnection = voiceConnection; + /** + * The UDP socket + * @type {?Socket} + */ + this.socket = null; + /** + * The address of the discord voice server + * @type {?string} + */ + this.discordAddress = null; + /** + * The local IP address + * @type {?string} + */ + this.localAddress = null; + /** + * The local port + * @type {?string} + */ + this.localPort = null; + } + /** + * The port of the discord voice server + * @readonly + */ + get discordPort() { + return this.voiceConnection.authentication.port; + } + + /** + * Tries to resolve the voice server endpoint to an address + * @returns {Promise} + */ + findEndpointAddress() { + return new Promise((resolve, reject) => { + dns.lookup(this.voiceConnection.authentication.endpoint, (error, address) => { + if (error) { + reject(error); + return; + } + resolve(address); + }); + }); + } + + /** + * Send a packet to the UDP client + * @param {Object} packet the packet to send + * @returns {Promise} + */ + send(packet) { + return new Promise((resolve, reject) => { + if (this.socket) { + if (!this.address || !this.port) { + reject(new Error('malformed UDP address or port')); + return; + } + this.socket.send(packet, 0, packet.length, this.port, this.address, error => { + if (error) { + reject(error); + } else { + resolve(packet); + } + }); + } else { + reject(new Error('tried to send a UDP packet but there is no socket available')); + } + }); + } + + createUDPSocket(address) { + this.discordAddress = address; + const socket = this.socket = udp.createSocket('udp4'); + + socket.once('message', message => { + const packet = parseLocalPacket(message); + if (packet.error) { + this.emit('error', packet.error); + return; + } + + this.localAddress = packet.address; + this.localPort = packet.port; + + this.voiceConnection.sockets.ws.sendPacket({ + op: Constants.VoiceOPCodes.SELECT_PROTOCOL, + d: { + protocol: 'udp', + data: { + address: packet.address, + port: packet.port, + mode: 'xsalsa20_poly1305', + }, + }, + }); + }); + + const blankMessage = new Buffer(70); + blankMessage.writeUIntBE(this.voiceConnection.authentication.ssrc, 0, 4); + this.send(blankMessage); } } From c4e1e4f50f9ff60f336f703dbf9c094d97fed61a Mon Sep 17 00:00:00 2001 From: Programmix Date: Sun, 2 Oct 2016 16:21:08 -0700 Subject: [PATCH 070/188] Add InviteResolvable (#766) * Add InviteResolvable Add InviteResolvable * Return data as fallback instead * Rename resolver method --- src/client/Client.js | 5 +++-- src/client/ClientDataResolver.js | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/client/Client.js b/src/client/Client.js index 494dd5cbc..bbc09aada 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -265,10 +265,11 @@ class Client extends EventEmitter { /** * Fetches an invite object from an invite code. - * @param {string} code the invite code. + * @param {InviteResolvable} invite An invite code or URL * @returns {Promise} */ - fetchInvite(code) { + fetchInvite(invite) { + const code = this.resolver.resolveInviteCode(invite); return this.rest.methods.getInvite(code); } diff --git a/src/client/ClientDataResolver.js b/src/client/ClientDataResolver.js index 70efc8470..f8f027e0d 100644 --- a/src/client/ClientDataResolver.js +++ b/src/client/ClientDataResolver.js @@ -205,6 +205,26 @@ class ClientDataResolver { return String(data); } + /** + * Data that can be resolved to give an invite code. This can be: + * * An invite code + * * An invite URL + * @typedef {string} InviteResolvable + */ + + /** + * Resolves InviteResolvable to an invite code + * @param {InviteResolvable} data The invite resolvable to resolve + * @returns {string} + */ + resolveInviteCode(data) { + const inviteRegex = /discord(?:app)?\.(?:gg|com\/invite)\/([a-z0-9]{5})/i; + const match = inviteRegex.exec(data); + + if (match && match[1]) return match[1]; + return data; + } + /** * Data that can be resolved to give a Buffer. This can be: * * A Buffer From e24c9c271e3f7ba5af986d2f74f692bd13d0ab81 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Mon, 3 Oct 2016 20:25:39 -0400 Subject: [PATCH 071/188] Quite possibly fix annoying bug Evie was complaining about --- src/structures/ClientUser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index 4e4d18cc7..3900945a9 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -130,7 +130,7 @@ class ClientUser extends User { let game = this.localPresence.game; let afk = this.localPresence.afk || this.presence.afk; - if (!game) { + if (!game && this.presence.game) { game = { name: this.presence.game.name, type: this.presence.game.type, From 8d777db1d1965fa1de3d210b8aa5c539be5ad8c9 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Mon, 3 Oct 2016 20:27:41 -0400 Subject: [PATCH 072/188] Clean up status type error --- src/structures/ClientUser.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index 3900945a9..24b36bb42 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -125,7 +125,7 @@ class ClientUser extends User { */ setPresence(data) { // {"op":3,"d":{"status":"dnd","since":0,"game":null,"afk":false}} - return new Promise((resolve, reject) => { + return new Promise(resolve => { let status = this.localPresence.status || this.presence.status; let game = this.localPresence.game; let afk = this.localPresence.afk || this.presence.afk; @@ -139,10 +139,7 @@ class ClientUser extends User { } if (data.status) { - if (typeof data.status !== 'string') { - reject(new TypeError('status must be a string')); - return; - } + if (typeof data.status !== 'string') throw new TypeError('Status must be a string'); status = data.status; } From 93425c3979bf85b3ccb7f6d3fe9b1fbb4ce2ddb1 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Tue, 4 Oct 2016 19:10:29 -0400 Subject: [PATCH 073/188] Expand collection array caching --- docs/docs.json | 2 +- src/util/Collection.js | 42 ++++++++++++++++++++++++------------------ 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index b49d3a033..303f91104 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1475349697813},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":217,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":246,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":261,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":283,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":351,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":357,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":228,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":238,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":280,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":691,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":714,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":739,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.array()[0];\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":632,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":669,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":257,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":271,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1475622584612},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":217,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":246,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":261,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":284,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":352,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":358,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":228,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":238,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":280,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":691,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":714,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":739,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":632,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":669,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/util/Collection.js b/src/util/Collection.js index 8425ae272..b70cec32f 100644 --- a/src/util/Collection.js +++ b/src/util/Collection.js @@ -3,36 +3,48 @@ * @extends {Map} */ class Collection extends Map { - set(key, value) { - super.set(key, value); - this.changed = true; + constructor(iterable) { + super(iterable); + this._array = null; + this._keyArray = null; + } + + set(key, val) { + super.set(key, val); + this._array = null; + this._keyArray = null; } delete(key) { super.delete(key); - this.changed = true; + this._array = null; + this._keyArray = null; } /** - * Returns an ordered array of the values of this collection. + * Creates an ordered array of the values of this collection, and caches it internally. The array will only be + * reconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array. * @returns {Array} * @example * // identical to: * Array.from(collection.values()); */ array() { - return Array.from(this.values()); + if (!this._array || this._array.length !== this.size) this._array = Array.from(this.values()); + return this._array; } /** - * Returns an ordered array of the keys of this collection. + * Creates an ordered array of the keys of this collection, and caches it internally. The array will only be + * reconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array. * @returns {Array} * @example * // identical to: * Array.from(collection.keys()); */ keyArray() { - return Array.from(this.keys()); + if (!this._keyArray || this._keyArray.length !== this.size) this._keyArray = Array.from(this.keys()); + return this._keyArray; } /** @@ -77,11 +89,8 @@ class Collection extends Map { * @returns {*} */ random() { - if (!this.cachedArray || this.cachedArray.length !== this.size || this.changed) { - this.cachedArray = this.array(); - this.changed = false; - } - return this.cachedArray[Math.floor(Math.random() * this.cachedArray.length)]; + const arr = this.array(); + return arr[Math.floor(Math.random() * arr.length)]; } /** @@ -90,11 +99,8 @@ class Collection extends Map { * @returns {*} */ randomKey() { - if (!this.cachedKeyArray || this.cachedKeyArray.length !== this.size || this.changed) { - this.cachedKeyArray = this.keyArray(); - this.changed = false; - } - return this.cachedKeyArray[Math.floor(Math.random() * this.cachedKeyArray.length)]; + const arr = this.keyArray(); + return arr[Math.floor(Math.random() * arr.length)]; } /** From 79b0d3f2a55f7950f237d2306a6c4d531601875c Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Thu, 6 Oct 2016 21:48:25 -0400 Subject: [PATCH 074/188] Client.readyTime -> readyAt (consistency) --- docs/docs.json | 2 +- src/client/Client.js | 12 ++++++++++-- src/client/websocket/packets/handlers/Ready.js | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 303f91104..01008d86f 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1475622584612},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":217,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":246,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":261,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":284,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":352,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":358,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":228,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":238,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":280,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":691,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":714,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":739,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":632,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":669,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1475804882715},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":225,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":234,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":254,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":269,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":279,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":292,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":202,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":360,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":366,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":228,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":238,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":280,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":691,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":714,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":739,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":632,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":669,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/client/Client.js b/src/client/Client.js index bbc09aada..5f397c81d 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -145,7 +145,7 @@ class Client extends EventEmitter { * The date at which the Client was regarded as being in the `READY` state. * @type {?Date} */ - this.readyTime = null; + this.readyAt = null; this._timeouts = new Set(); this._intervals = new Set(); @@ -170,7 +170,7 @@ class Client extends EventEmitter { * @readonly */ get uptime() { - return this.readyTime ? Date.now() - this.readyTime : null; + return this.readyAt ? Date.now() - this.readyAt : null; } /** @@ -195,6 +195,14 @@ class Client extends EventEmitter { return emojis; } + /** + * The timestamp that the client was last ready at + * @type {?number} + */ + get readyTimestamp() { + return this.readyAt ? this.readyAt.getTime() : null; + } + /** * Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's * much better to use a bot account rather than a user account. diff --git a/src/client/websocket/packets/handlers/Ready.js b/src/client/websocket/packets/handlers/Ready.js index 7236148d3..b6f3e1e1d 100644 --- a/src/client/websocket/packets/handlers/Ready.js +++ b/src/client/websocket/packets/handlers/Ready.js @@ -10,7 +10,7 @@ class ReadyHandler extends AbstractHandler { const clientUser = new ClientUser(client, data.user); client.user = clientUser; - client.readyTime = new Date(); + client.readyAt = new Date(); client.users.set(clientUser.id, clientUser); for (const guild of data.guilds) client.dataManager.newGuild(guild); From f9b7f9c27e0957929297bbdff71b465252b8cf9e Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Thu, 6 Oct 2016 21:49:08 -0400 Subject: [PATCH 075/188] Add readonly --- docs/docs.json | 2 +- src/client/Client.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 01008d86f..a1cd84cc2 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1475804882715},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":225,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":234,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":254,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":269,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":279,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":292,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":202,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":360,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":366,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":228,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":238,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":280,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":691,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":714,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":739,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":632,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":669,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1475804943657},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":235,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":255,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":270,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":280,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":293,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":203,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":361,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":367,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":228,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":238,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":280,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":691,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":714,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":739,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":632,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":669,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/client/Client.js b/src/client/Client.js index 5f397c81d..ce72ae6bb 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -198,6 +198,7 @@ class Client extends EventEmitter { /** * The timestamp that the client was last ready at * @type {?number} + * @readonly */ get readyTimestamp() { return this.readyAt ? this.readyAt.getTime() : null; From 1c4ed4547f31d762fb354d7d936a550a0735d88b Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Fri, 7 Oct 2016 13:09:41 -0500 Subject: [PATCH 076/188] adds new WebhookClient and allows you to fetch channel webhooks and such without being "over the top" (#768) * start blocking out client * proto webhookclient * wee working webhooks * it's all working * run docs * fix jsdoc issues * add example for webhookClient * add example in the examples place * fix docs --- docs/custom/examples/webhook.js | 12 ++ docs/custom/webhook.js | 10 + docs/docs.json | 2 +- src/client/WebhookClient.js | 46 +++++ src/client/rest/RESTMethods.js | 82 +++++++++ src/index.js | 2 + src/structures/Guild.js | 8 + src/structures/TextChannel.js | 3 + src/structures/Webhook.js | 184 +++++++++++++++++++ src/structures/interface/TextBasedChannel.js | 46 +++++ src/util/Constants.js | 6 +- 11 files changed, 399 insertions(+), 2 deletions(-) create mode 100644 docs/custom/examples/webhook.js create mode 100644 docs/custom/webhook.js create mode 100644 src/client/WebhookClient.js create mode 100644 src/structures/Webhook.js diff --git a/docs/custom/examples/webhook.js b/docs/custom/examples/webhook.js new file mode 100644 index 000000000..13cf7c883 --- /dev/null +++ b/docs/custom/examples/webhook.js @@ -0,0 +1,12 @@ +/* + Send a message using a webhook +*/ + +// import the discord.js module +const Discord = require('discord.js'); + +// create a new webhook +const hook = new Discord.WebhookClient('webhook id', 'webhook token'); + +// send a message using the webhook +hook.sendMessage('I am now alive!'); diff --git a/docs/custom/webhook.js b/docs/custom/webhook.js new file mode 100644 index 000000000..10f57f361 --- /dev/null +++ b/docs/custom/webhook.js @@ -0,0 +1,10 @@ +const fs = require('fs'); + +module.exports = { + category: 'Examples', + name: 'Webhooks', + data: +`\`\`\`js +${fs.readFileSync('./docs/custom/examples/webhook.js').toString('utf-8')} +\`\`\``, +}; diff --git a/docs/docs.json b/docs/docs.json index a1cd84cc2..787ac05b1 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1475804943657},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":235,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":255,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":270,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":280,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":293,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":203,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":361,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":367,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":228,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":238,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":280,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":691,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":714,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":739,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":632,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":669,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1475863241345},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":235,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":255,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":270,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":280,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":293,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":203,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":361,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":367,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":228,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":238,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":280,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":86,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":101,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":114,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":141,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":155,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":165,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guild_id","name":"guild_id","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channel_id","name":"channel_id","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":58,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.array()[0];\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":337,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[],"implements":["TextBasedChannel#fetchWebhooks"]},{"id":"TextChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextChannel","meta":{"line":346,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchWebhook"]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":360,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}],"implements":["TextBasedChannel#createWebhook"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":6,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":86,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":101,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":114,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":141,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":155,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":165,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guild_id","name":"guild_id","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channel_id","name":"channel_id","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":58,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"id":"TextBasedChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextBasedChannel","meta":{"line":337,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"TextBasedChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextBasedChannel","meta":{"line":346,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextBasedChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":360,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":67,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file diff --git a/src/client/WebhookClient.js b/src/client/WebhookClient.js new file mode 100644 index 000000000..6b2cbb12a --- /dev/null +++ b/src/client/WebhookClient.js @@ -0,0 +1,46 @@ +const Webhook = require('../structures/Webhook'); +const RESTManager = require('./rest/RESTManager'); +const ClientDataResolver = require('./ClientDataResolver'); +const mergeDefault = require('../util/MergeDefault'); +const Constants = require('../util/Constants'); + +/** + * The Webhook Client + * @extends {Webhook} + */ +class WebhookClient extends Webhook { + /** + * @param {string} id The id of the webhook. + * @param {string} token the token of the webhook. + * @param {ClientOptions} [options] Options for the client + * @example + * // create a new webhook and send a message + * let hook = new Discord.WebhookClient('1234', 'abcdef') + * hook.sendMessage('This will send a message').catch(console.log) + */ + constructor(id, token, options) { + super(null, id, token); + + /** + * The options the client was instantiated with + * @type {ClientOptions} + */ + this.options = mergeDefault(Constants.DefaultOptions, options); + + /** + * The REST manager of the client + * @type {RESTManager} + * @private + */ + this.rest = new RESTManager(this); + + /** + * The Data Resolver of the Client + * @type {ClientDataResolver} + * @private + */ + this.resolver = new ClientDataResolver(this); + } +} + +module.exports = WebhookClient; diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 4d0cc6271..52de7080c 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -7,6 +7,7 @@ const User = requireStructure('User'); const GuildMember = requireStructure('GuildMember'); const Role = requireStructure('Role'); const Invite = requireStructure('Invite'); +const Webhook = requireStructure('Webhook'); class RESTMethods { constructor(restManager) { @@ -537,6 +538,87 @@ class RESTMethods { }).catch(reject); }); } + + fetchGuildWebhooks(guild) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('get', Constants.Endpoints.guildWebhooks(guild.id), true) + .then(data => { + const hooks = new Collection(); + for (const hook of data) { + hooks.set(hook.id, new Webhook(this.rest.client, hook)); + } + resolve(hooks); + }).catch(reject); + }); + } + + fetchChannelWebhooks(channel) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('get', Constants.Endpoints.channelWebhooks(channel.id), true) + .then(data => { + const hooks = new Collection(); + for (const hook of data) { + hooks.set(hook.id, new Webhook(this.rest.client, hook)); + } + resolve(hooks); + }).catch(reject); + }); + } + + fetchWebhook(id, token) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('get', Constants.Endpoints.webhook(id, token), require('util').isUndefined(token)) + .then(data => { + resolve(new Webhook(this.rest.client, data)); + }).catch(reject); + }); + } + + createChannelWebhook(channel, name, avatar) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('post', Constants.Endpoints.channelWebhooks(channel.id), true, { + name: name, avatar: avatar, + }) + .then(data => { + resolve(new Webhook(this.rest.client, data)); + }).catch(reject); + }); + } + + deleteChannelWebhook(webhook) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('delete', Constants.Endpoints.webhook(webhook.id, webhook.token), false) + .then(resolve).catch(reject); + }); + } + + editChannelWebhook(webhook, name, avatar) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('patch', Constants.Endpoints.webhook(webhook.id, webhook.token), false, { + name: name, avatar: avatar, + }) + .then(data => { + resolve(data); + }).catch(reject); + }); + } + + sendWebhookMessage(webhook, content, { avatarURL, tts, disableEveryone, embeds } = {}, file = null) { + return new Promise((resolve, reject) => { + if (typeof content !== 'undefined') content = this.rest.client.resolver.resolveString(content); + + if (disableEveryone || (typeof disableEveryone === 'undefined' && this.rest.client.options.disableEveryone)) { + content = content.replace('@everyone', '@\u200beveryone').replace('@here', '@\u200bhere'); + } + + this.rest.makeRequest('post', `${Constants.Endpoints.webhook(webhook.id, webhook.token)}?wait=true`, false, { + content: content, username: webhook.name, avatar_url: avatarURL, tts: tts, file: file, embeds: embeds, + }) + .then(data => { + resolve(data); + }).catch(reject); + }); + } } module.exports = RESTMethods; diff --git a/src/index.js b/src/index.js index 1d23a027c..b39ad9f45 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,6 @@ module.exports = { Client: require('./client/Client'), + WebhookClient: require('./client/WebhookClient'), Shard: require('./sharding/Shard'), ShardClientUtil: require('./sharding/ShardClientUtil'), ShardingManager: require('./sharding/ShardingManager'), @@ -28,6 +29,7 @@ module.exports = { TextChannel: require('./structures/TextChannel'), User: require('./structures/User'), VoiceChannel: require('./structures/VoiceChannel'), + Webhook: require('./structures/Webhook'), version: require('../package').version, }; diff --git a/src/structures/Guild.js b/src/structures/Guild.js index d08db67d5..89e9cface 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -622,6 +622,14 @@ class Guild { return this.client.rest.methods.deleteGuild(this); } + /** + * Fetch all webhooks for the guild. + * @returns {Collection} + */ + fetchWebhooks() { + return this.client.rest.methods.fetchGuildWebhooks(this); + } + /** * Whether this Guild equals another Guild. It compares all properties, so for most operations * it is advisable to just compare `guild.id === guild2.id` as it is much faster and is often diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index d14b2e28a..d6440cea3 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -57,6 +57,9 @@ class TextChannel extends GuildChannel { createCollector() { return; } awaitMessages() { return; } bulkDelete() { return; } + fetchWebhook() { return; } + fetchWebhooks() { return; } + createWebhook() { return; } _cacheMessage() { return; } } diff --git a/src/structures/Webhook.js b/src/structures/Webhook.js new file mode 100644 index 000000000..1431c863e --- /dev/null +++ b/src/structures/Webhook.js @@ -0,0 +1,184 @@ +const path = require('path'); + +/** + * Represents a Webhook + */ +class Webhook { + constructor(client, dataOrID, token) { + if (client) { + /** + * The client that instantiated the Channel + * @type {Client} + */ + this.client = client; + Object.defineProperty(this, 'client', { enumerable: false, configurable: false }); + if (dataOrID) this.setup(dataOrID); + } else { + this.id = dataOrID; + this.token = token; + this.client = this; + } + } + + setup(data) { + /** + * The name of the Webhook + * @type {string} + */ + this.name = data.name; + + /** + * The token for the Webhook + * @type {string} + */ + this.token = data.token; + + /** + * The avatar for the Webhook + * @type {string} + */ + this.avatar = data.avatar; + + /** + * The ID of the Webhook + * @type {string} + */ + this.id = data.id; + + /** + * The guild the Webhook belongs to + * @type {string} + */ + this.guild_id = data.guild_id; + + /** + * The channel the Webhook belongs to + * @type {string} + */ + this.channel_id = data.channel_id; + + /** + * The owner of the Webhook + * @type {User} + */ + if (data.user) this.owner = data.user; + } + + /** + * Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode + * @typedef {Object} MessageOptions + * @property {boolean} [tts=false] Whether or not the message should be spoken aloud + * @property {boolean} [disableEveryone=this.options.disableEveryone] Whether or not @everyone and @here + * should be replaced with plain-text + */ + + /** + * Send a message with this webhook + * @param {StringResolvable} content The content to send + * @param {MessageOptions} [options={}] The options to provide + * @returns {Promise} + * @example + * // send a message + * webook.sendMessage('hello!') + * .then(message => console.log(`Sent message: ${message.content}`)) + * .catch(console.error); + */ + sendMessage(content, options = {}) { + return this.client.rest.methods.sendWebhookMessage(this, content, options); + } + + /** + * Send a text-to-speech message with this webhook + * @param {StringResolvable} content The content to send + * @param {MessageOptions} [options={}] The options to provide + * @returns {Promise} + * @example + * // send a TTS message + * webhook.sendTTSMessage('hello!') + * .then(message => console.log(`Sent tts message: ${message.content}`)) + * .catch(console.error); + */ + sendTTSMessage(content, options = {}) { + Object.assign(options, { tts: true }); + return this.client.rest.methods.sendWebhookMessage(this, content, options); + } + + /** + * Send a file with this webhook + * @param {FileResolvable} attachment The file to send + * @param {string} [fileName="file.jpg"] The name and extension of the file + * @param {StringResolvable} [content] Text message to send with the attachment + * @param {MessageOptions} [options] The options to provide + * @returns {Promise} + */ + sendFile(attachment, fileName, content, options = {}) { + if (!fileName) { + if (typeof attachment === 'string') { + fileName = path.basename(attachment); + } else if (attachment && attachment.path) { + fileName = path.basename(attachment.path); + } else { + fileName = 'file.jpg'; + } + } + return new Promise((resolve, reject) => { + this.client.resolver.resolveFile(attachment).then(file => { + this.client.rest.methods.sendWebhookMessage(this, content, options, { + file, + name: fileName, + }).then(resolve).catch(reject); + }).catch(reject); + }); + } + + /** + * Send a code block with this webhook + * @param {string} lang Language for the code block + * @param {StringResolvable} content Content of the code block + * @param {MessageOptions} options The options to provide + * @returns {Promise} + */ + sendCode(lang, content, options = {}) { + if (options.split) { + if (typeof options.split !== 'object') options.split = {}; + if (!options.split.prepend) options.split.prepend = `\`\`\`${lang ? lang : ''}\n`; + if (!options.split.append) options.split.append = '\n```'; + } + content = this.client.resolver.resolveString(content).replace(/```/g, '`\u200b``'); + return this.sendMessage(`\`\`\`${lang ? lang : ''}\n${content}\n\`\`\``, options); + } + + /** + * Delete the Webhook + * @returns {Promise} + */ + delete() { + return this.client.rest.methods.deleteChannelWebhook(this); + } + + /** + * Edit the Webhook. + * @param {string} name The new name for the Webhook + * @param {FileResolvable} avatar The new avatar for the Webhook. + * @returns {Promise} + */ + edit(name, avatar) { + return new Promise((resolve, reject) => { + if (avatar) { + this.client.resolver.resolveFile(avatar).then(file => { + let base64 = new Buffer(file, 'binary').toString('base64'); + let dataURI = `data:;base64,${base64}`; + this.client.rest.methods.editChannelWebhook(this, name, dataURI) + .then(resolve).catch(reject); + }).catch(reject); + } else { + this.client.rest.methods.editChannelWebhook(this, name) + .then(data => { + this.setup(data); + }).catch(reject); + } + }); + } +} + +module.exports = Webhook; diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 88b1cea5b..19e52707d 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -329,6 +329,49 @@ class TextBasedChannel { this.messages.set(message.id, message); return message; } + + /** + * Fetch all webhooks for the channel. + * @returns {Collection} + */ + fetchWebhooks() { + return this.client.rest.methods.fetchChannelWebhooks(this); + } + + /** + * Fetch a webhook by ID + * @param {string} id The id of the webhook. + * @returns {Promise} + */ + fetchWebhook(id) { + return this.client.rest.methods.fetchWebhook(id); + } + + /** + * Create a webhook for the channel. + * @param {string} name The name of the webhook. + * @param {FileResolvable=} avatar The avatar for the webhook. + * @returns {Webhook} webhook The created webhook. + * @example + * channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png') + * .then(webhook => console.log(`Created Webhook ${webhook}`)) + * .catch(console.log) + */ + createWebhook(name, avatar) { + return new Promise((resolve, reject) => { + if (avatar) { + this.client.resolver.resolveFile(avatar).then(file => { + let base64 = new Buffer(file, 'binary').toString('base64'); + let dataURI = `data:;base64,${base64}`; + this.client.rest.methods.createChannelWebhook(this, name, dataURI) + .then(resolve).catch(reject); + }).catch(reject); + } else { + this.client.rest.methods.createChannelWebhook(this, name) + .then(resolve).catch(reject); + } + }); + } } exports.applyToClass = (structure, full = false) => { @@ -345,6 +388,9 @@ exports.applyToClass = (structure, full = false) => { props.push('fetchPinnedMessages'); props.push('createCollector'); props.push('awaitMessages'); + props.push('fetchWebhooks'); + props.push('fetchWebhook'); + props.push('createWebhook'); } for (const prop of props) applyProp(structure, prop); }; diff --git a/src/util/Constants.js b/src/util/Constants.js index 9cf3771c9..6db424e39 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -103,6 +103,10 @@ const Endpoints = exports.Endpoints = { channelTyping: (channelID) => `${Endpoints.channel(channelID)}/typing`, channelPermissions: (channelID) => `${Endpoints.channel(channelID)}/permissions`, channelMessage: (channelID, messageID) => `${Endpoints.channelMessages(channelID)}/${messageID}`, + channelWebhooks: (channelID) => `${Endpoints.channel(channelID)}/webhooks`, + + // webhooks + webhook: (webhookID, token) => `${API}/webhooks/${webhookID}${token ? `/${token}` : ''}`, }; exports.Status = { @@ -242,7 +246,7 @@ const PermissionFlags = exports.PermissionFlags = { CHANGE_NICKNAME: 1 << 26, MANAGE_NICKNAMES: 1 << 27, MANAGE_ROLES_OR_PERMISSIONS: 1 << 28, - + MANAGE_WEBHOOKS: 1 << 29, MANAGE_EMOJIS: 1 << 30, }; From da5183a5d5a8bf2bba6478c145d184589be1403f Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sat, 8 Oct 2016 00:11:57 -0400 Subject: [PATCH 077/188] Expose splitMessage --- src/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/index.js b/src/index.js index b39ad9f45..090c24e84 100644 --- a/src/index.js +++ b/src/index.js @@ -4,7 +4,9 @@ module.exports = { Shard: require('./sharding/Shard'), ShardClientUtil: require('./sharding/ShardClientUtil'), ShardingManager: require('./sharding/ShardingManager'), + Collection: require('./util/Collection'), + splitMessage: require('./util/SplitMessage'), Channel: require('./structures/Channel'), ClientUser: require('./structures/ClientUser'), From 4653f885557a174fd2c60d7e30831509394baab7 Mon Sep 17 00:00:00 2001 From: Programmix Date: Sun, 9 Oct 2016 10:27:31 -0700 Subject: [PATCH 078/188] Add disabledEvents option to Client (#784) --- src/client/websocket/packets/WebSocketPacketManager.js | 2 ++ src/util/Constants.js | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/client/websocket/packets/WebSocketPacketManager.js b/src/client/websocket/packets/WebSocketPacketManager.js index 25e17861b..3295ef646 100644 --- a/src/client/websocket/packets/WebSocketPacketManager.js +++ b/src/client/websocket/packets/WebSocketPacketManager.js @@ -84,6 +84,8 @@ class WebSocketPacketManager { this.setSequence(packet.s); + if (this.ws.client.options.disabledEvents.includes(packet.t)) return false; + if (this.ws.status !== Constants.Status.READY) { if (BeforeReadyWhitelist.indexOf(packet.t) === -1) { this.queue.push(packet); diff --git a/src/util/Constants.js b/src/util/Constants.js index 6db424e39..0ac069a5c 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -17,6 +17,9 @@ exports.Package = require('../../package.json'); * @property {boolean} [disableEveryone=false] Default value for MessageOptions.disableEveryone * @property {number} [restWsBridgeTimeout=5000] Maximum time permitted between REST responses and their * corresponding websocket events + * @property {string[]} [disabledEvents] An array of disabled websocket events. Events in this array will not be + * processed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on + * large-scale bots. * @property {WebsocketOptions} [ws] Options for the websocket */ exports.DefaultOptions = { @@ -29,6 +32,7 @@ exports.DefaultOptions = { fetchAllMembers: false, disableEveryone: false, restWsBridgeTimeout: 5000, + disabledEvents: [], /** * Websocket options. These are left as snake_case to match the API. From 3e2d6ccc48889f4c417c122c9a5cf78cf245c72a Mon Sep 17 00:00:00 2001 From: Programmix Date: Sun, 9 Oct 2016 11:22:52 -0700 Subject: [PATCH 079/188] Convert disabledEvents Array to Object (#786) * Convert disabledEvents Array to Object Increased performance * Commit to please Lord Gawdl3y * Nitpick with chopsticks --- src/client/Client.js | 11 +++++++++++ .../websocket/packets/WebSocketPacketManager.js | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/client/Client.js b/src/client/Client.js index ce72ae6bb..c1b4e78f1 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -37,6 +37,17 @@ class Client extends EventEmitter { this.options.shardCount = Number(process.env.SHARD_COUNT); } + if (!(this.options.disabledEvents instanceof Array)) { + throw new TypeError('The disabledEvents client option must be an array.'); + } + + let disabledEvents = {}; + for (const event in this.options.disabledEvents) { + disabledEvents[event] = true; + } + + this.options.disabledEvents = disabledEvents; + /** * The REST manager of the client * @type {RESTManager} diff --git a/src/client/websocket/packets/WebSocketPacketManager.js b/src/client/websocket/packets/WebSocketPacketManager.js index 3295ef646..5ef060f0e 100644 --- a/src/client/websocket/packets/WebSocketPacketManager.js +++ b/src/client/websocket/packets/WebSocketPacketManager.js @@ -84,7 +84,9 @@ class WebSocketPacketManager { this.setSequence(packet.s); - if (this.ws.client.options.disabledEvents.includes(packet.t)) return false; + if (this.ws.client.options.disabledEvents[packet.t] !== undefined) { + return false; + } if (this.ws.status !== Constants.Status.READY) { if (BeforeReadyWhitelist.indexOf(packet.t) === -1) { From 7b571f972926cdad5f6f286e836f23fa2d883818 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sun, 9 Oct 2016 14:32:48 -0400 Subject: [PATCH 080/188] Add escapeMarkdown util function --- src/index.js | 1 + src/structures/Message.js | 3 ++- src/structures/interface/TextBasedChannel.js | 3 ++- src/util/EscapeMarkdown.js | 4 ++++ 4 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 src/util/EscapeMarkdown.js diff --git a/src/index.js b/src/index.js index 090c24e84..24b5a26da 100644 --- a/src/index.js +++ b/src/index.js @@ -7,6 +7,7 @@ module.exports = { Collection: require('./util/Collection'), splitMessage: require('./util/SplitMessage'), + escapeMarkdown: require('./util/EscapeMarkdown'), Channel: require('./structures/Channel'), ClientUser: require('./structures/ClientUser'), diff --git a/src/structures/Message.js b/src/structures/Message.js index ffd04b19b..2ead7f0e8 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -2,6 +2,7 @@ const Attachment = require('./MessageAttachment'); const Embed = require('./MessageEmbed'); const Collection = require('../util/Collection'); const Constants = require('../util/Constants'); +const escapeMarkdown = require('../../util/EscapeMarkdown'); /** * Represents a Message on Discord @@ -332,7 +333,7 @@ class Message { * @returns {Promise} */ editCode(lang, content) { - content = this.client.resolver.resolveString(content).replace(/```/g, '`\u200b``'); + content = escapeMarkdown(this.client.resolver.resolveString(content), true); return this.edit(`\`\`\`${lang ? lang : ''}\n${content}\n\`\`\``); } diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 19e52707d..ceac04d75 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -2,6 +2,7 @@ const path = require('path'); const Message = require('../Message'); const MessageCollector = require('../MessageCollector'); const Collection = require('../../util/Collection'); +const escapeMarkdown = require('../../util/EscapeMarkdown'); /** * Interface for classes that have text-channel-like features @@ -114,7 +115,7 @@ class TextBasedChannel { if (!options.split.prepend) options.split.prepend = `\`\`\`${lang ? lang : ''}\n`; if (!options.split.append) options.split.append = '\n```'; } - content = this.client.resolver.resolveString(content).replace(/```/g, '`\u200b``'); + content = escapeMarkdown(this.client.resolver.resolveString(content), true); return this.sendMessage(`\`\`\`${lang ? lang : ''}\n${content}\n\`\`\``, options); } diff --git a/src/util/EscapeMarkdown.js b/src/util/EscapeMarkdown.js new file mode 100644 index 000000000..01e01206f --- /dev/null +++ b/src/util/EscapeMarkdown.js @@ -0,0 +1,4 @@ +module.exports = function escapeMarkdown(text, onlyCodeBlock = false) { + if (onlyCodeBlock) return text.replace(/```/g, '`\u200b``'); + return text.replace(/\\(\*|_|`|~|\\)/g, '$1').replace(/(\*|_|`|~|\\)/g, '\\$1'); +}; From dabe51fc8d06311c3f9d42131f0333d5ef83a598 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sun, 9 Oct 2016 14:41:57 -0400 Subject: [PATCH 081/188] Reorganise disabledEvents stuff --- src/client/Client.js | 7 ------- src/client/websocket/WebSocketManager.js | 11 ++++++++--- .../websocket/packets/WebSocketPacketManager.js | 4 +--- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/client/Client.js b/src/client/Client.js index c1b4e78f1..f5327e447 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -41,13 +41,6 @@ class Client extends EventEmitter { throw new TypeError('The disabledEvents client option must be an array.'); } - let disabledEvents = {}; - for (const event in this.options.disabledEvents) { - disabledEvents[event] = true; - } - - this.options.disabledEvents = disabledEvents; - /** * The REST manager of the client * @type {RESTManager} diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index ffc6b2358..aee234cc5 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -59,6 +59,13 @@ class WebSocketManager extends EventEmitter { */ this.ws = null; + /** + * An object with keys that are websocket event names that should be ignored + * @type {Object} + */ + this.disabledEvents = {}; + for (const event in client.options.disabledEvents) this.disabledEvents[event] = true; + this.first = true; } @@ -69,9 +76,7 @@ class WebSocketManager extends EventEmitter { _connect(gateway) { this.client.emit('debug', `Connecting to gateway ${gateway}`); this.normalReady = false; - if (this.status !== Constants.Status.RECONNECTING) { - this.status = Constants.Status.CONNECTING; - } + if (this.status !== Constants.Status.RECONNECTING) this.status = Constants.Status.CONNECTING; this.ws = new WebSocket(gateway); this.ws.onopen = () => this.eventOpen(); this.ws.onclose = (d) => this.eventClose(d); diff --git a/src/client/websocket/packets/WebSocketPacketManager.js b/src/client/websocket/packets/WebSocketPacketManager.js index 5ef060f0e..0c2b025cc 100644 --- a/src/client/websocket/packets/WebSocketPacketManager.js +++ b/src/client/websocket/packets/WebSocketPacketManager.js @@ -84,9 +84,7 @@ class WebSocketPacketManager { this.setSequence(packet.s); - if (this.ws.client.options.disabledEvents[packet.t] !== undefined) { - return false; - } + if (this.ws.disabledEvents[packet.t] !== undefined) return false; if (this.ws.status !== Constants.Status.READY) { if (BeforeReadyWhitelist.indexOf(packet.t) === -1) { From e3b2f1f3da36c244d7d9f4da3168f71b32f376fb Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sun, 9 Oct 2016 15:08:21 -0400 Subject: [PATCH 082/188] Fix require path --- src/structures/Message.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/Message.js b/src/structures/Message.js index 2ead7f0e8..31afb2b1d 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -2,7 +2,7 @@ const Attachment = require('./MessageAttachment'); const Embed = require('./MessageEmbed'); const Collection = require('../util/Collection'); const Constants = require('../util/Constants'); -const escapeMarkdown = require('../../util/EscapeMarkdown'); +const escapeMarkdown = require('../util/EscapeMarkdown'); /** * Represents a Message on Discord From a717b60417652754200c28dfb583a808139401ad Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sun, 9 Oct 2016 15:11:15 -0400 Subject: [PATCH 083/188] Add validation for all non-ws client options --- docs/docs.json | 2 +- src/client/Client.js | 52 ++++++++++++++++++++++++++++++++----------- src/util/Constants.js | 2 +- 3 files changed, 41 insertions(+), 15 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 787ac05b1..5447447de 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1475863241345},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":235,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":255,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":270,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":280,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":293,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":203,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":361,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":367,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":228,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":238,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":280,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":86,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":101,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":114,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":141,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":155,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":165,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guild_id","name":"guild_id","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channel_id","name":"channel_id","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":58,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.array()[0];\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":337,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[],"implements":["TextBasedChannel#fetchWebhooks"]},{"id":"TextChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextChannel","meta":{"line":346,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchWebhook"]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":360,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}],"implements":["TextBasedChannel#createWebhook"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":6,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":86,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":101,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":114,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":141,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":155,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":165,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guild_id","name":"guild_id","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channel_id","name":"channel_id","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":58,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"id":"TextBasedChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextBasedChannel","meta":{"line":337,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"TextBasedChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextBasedChannel","meta":{"line":346,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextBasedChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":360,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":67,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476040231249},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":223,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":232,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":252,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":267,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":277,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":290,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":121,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":139,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":145,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":160,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":169,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":178,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":187,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":200,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":391,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":397,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":86,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":101,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":114,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":141,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":155,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":165,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guild_id","name":"guild_id","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channel_id","name":"channel_id","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":58,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":338,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[],"implements":["TextBasedChannel#fetchWebhooks"]},{"id":"TextChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextChannel","meta":{"line":347,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchWebhook"]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":361,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}],"implements":["TextBasedChannel#createWebhook"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":6,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":86,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":101,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":114,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":141,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":155,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":165,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guild_id","name":"guild_id","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channel_id","name":"channel_id","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":58,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"id":"TextBasedChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextBasedChannel","meta":{"line":338,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"TextBasedChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextBasedChannel","meta":{"line":347,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextBasedChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":361,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":67,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/client/Client.js b/src/client/Client.js index f5327e447..80362ba15 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -23,23 +23,16 @@ class Client extends EventEmitter { constructor(options) { super(); + // Obtain shard details from environment + if (!options.shardId && 'SHARD_ID' in process.env) options.shardId = Number(process.env.SHARD_ID); + if (!options.shardCount && 'SHARD_COUNT' in process.env) options.shardCount = Number(process.env.SHARD_COUNT); + /** * The options the client was instantiated with * @type {ClientOptions} */ this.options = mergeDefault(Constants.DefaultOptions, options); - - if (!this.options.shardId && 'SHARD_ID' in process.env) { - this.options.shardId = Number(process.env.SHARD_ID); - } - - if (!this.options.shardCount && 'SHARD_COUNT' in process.env) { - this.options.shardCount = Number(process.env.SHARD_COUNT); - } - - if (!(this.options.disabledEvents instanceof Array)) { - throw new TypeError('The disabledEvents client option must be an array.'); - } + this._validateOptions(); /** * The REST manager of the client @@ -295,7 +288,7 @@ class Client extends EventEmitter { * or -1 if the message cache lifetime is unlimited */ sweepMessages(lifetime = this.options.messageCacheLifetime) { - if (typeof lifetime !== 'number' || isNaN(lifetime)) throw new TypeError('Lifetime must be a number.'); + if (typeof lifetime !== 'number' || isNaN(lifetime)) throw new TypeError('The lifetime must be a number.'); if (lifetime <= 0) { this.emit('debug', 'Didn\'t sweep messages - lifetime is unlimited'); return -1; @@ -358,6 +351,39 @@ class Client extends EventEmitter { _eval(script) { return eval(script); } + + _validateOptions(options = this.options) { + if (typeof options.shardCount !== 'number' || isNaN(options.shardCount)) { + throw new TypeError('The shardCount option must be a number.'); + } + if (typeof options.shardId !== 'number' || isNaN(options.shardId)) { + throw new TypeError('The shardId option must be a number.'); + } + if (options.shardCount < 0) throw new RangeError('The shardCount option must be at least 0.'); + if (options.shardId < 0) throw new RangeError('The shardId option must be at least 0.'); + if (options.shardId !== 0 && options.shardId >= options.shardCount) { + throw new RangeError('The shardId option must be less than shardCount.'); + } + if (typeof options.maxMessageCache !== 'number' || isNaN(options.maxMessageCache)) { + throw new TypeError('The maxMessageCache option must be a number.'); + } + if (typeof options.messageCacheLifetime !== 'number' || isNaN(options.messageCacheLifetime)) { + throw new TypeError('The messageCacheLifetime option must be a number.'); + } + if (typeof options.messageSweepInterval !== 'number' || isNaN(options.messageSweepInterval)) { + throw new TypeError('The messageSweepInterval option must be a number.'); + } + if (typeof options.fetchAllMembers !== 'boolean') { + throw new TypeError('The fetchAllMembers option must be a boolean.'); + } + if (typeof options.disableEveryone !== 'boolean') { + throw new TypeError('The disableEveryone option must be a boolean.'); + } + if (typeof options.restWsBridgeTimeout !== 'number' || isNaN(options.restWsBridgeTimeout)) { + throw new TypeError('The restWsBridgeTimeout option must be a number.'); + } + if (!(options.disabledEvents instanceof Array)) throw new TypeError('The disabledEvents option must be an Array.'); + } } module.exports = Client; diff --git a/src/util/Constants.js b/src/util/Constants.js index 0ac069a5c..b45a91474 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -11,7 +11,7 @@ exports.Package = require('../../package.json'); * @property {number} [messageCacheLifetime=0] How long until a message should be uncached by the message sweeping * (in seconds, 0 for forever) * @property {number} [messageSweepInterval=0] How frequently to remove messages from the cache that are older than - * the max message lifetime (in seconds, 0 for never) + * the message cache lifetime (in seconds, 0 for never) * @property {boolean} [fetchAllMembers=false] Whether to cache all guild members and users upon startup, as well as * upon joining a guild * @property {boolean} [disableEveryone=false] Default value for MessageOptions.disableEveryone From 7a53f70978ef56a787567d78574c63474c0730d3 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sun, 9 Oct 2016 15:16:54 -0400 Subject: [PATCH 084/188] Rename maxMessageCache -> messageCacheMaxSize --- docs/docs.json | 2 +- src/client/Client.js | 4 ++-- src/structures/interface/TextBasedChannel.js | 2 +- src/util/Constants.js | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 5447447de..6a4f80fca 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476040231249},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":223,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":232,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":252,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":267,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":277,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":290,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":121,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":139,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":145,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":160,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":169,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":178,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":187,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":200,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":391,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":397,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":86,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":101,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":114,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":141,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":155,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":165,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guild_id","name":"guild_id","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channel_id","name":"channel_id","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":58,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":338,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[],"implements":["TextBasedChannel#fetchWebhooks"]},{"id":"TextChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextChannel","meta":{"line":347,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchWebhook"]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":361,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}],"implements":["TextBasedChannel#createWebhook"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":6,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":86,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":101,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":114,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":141,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":155,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":165,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guild_id","name":"guild_id","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channel_id","name":"channel_id","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":58,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"id":"TextBasedChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextBasedChannel","meta":{"line":338,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"TextBasedChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextBasedChannel","meta":{"line":347,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextBasedChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":361,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":67,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476040482243},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":223,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":232,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":252,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":267,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":277,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":290,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":121,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":139,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":145,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":160,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":169,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":178,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":187,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":200,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":391,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":397,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":86,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":101,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":114,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":141,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":155,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":165,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guild_id","name":"guild_id","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channel_id","name":"channel_id","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":58,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":338,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[],"implements":["TextBasedChannel#fetchWebhooks"]},{"id":"TextChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextChannel","meta":{"line":347,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchWebhook"]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":361,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}],"implements":["TextBasedChannel#createWebhook"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":6,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":86,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":101,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":114,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":141,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":155,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":165,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guild_id","name":"guild_id","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channel_id","name":"channel_id","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":58,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"id":"TextBasedChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextBasedChannel","meta":{"line":338,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"TextBasedChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextBasedChannel","meta":{"line":347,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextBasedChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":361,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":67,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/client/Client.js b/src/client/Client.js index 80362ba15..ab2664064 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -364,8 +364,8 @@ class Client extends EventEmitter { if (options.shardId !== 0 && options.shardId >= options.shardCount) { throw new RangeError('The shardId option must be less than shardCount.'); } - if (typeof options.maxMessageCache !== 'number' || isNaN(options.maxMessageCache)) { - throw new TypeError('The maxMessageCache option must be a number.'); + if (typeof options.messageCacheMaxSize !== 'number' || isNaN(options.messageCacheMaxSize)) { + throw new TypeError('The messageCacheMaxSize option must be a number.'); } if (typeof options.messageCacheLifetime !== 'number' || isNaN(options.messageCacheLifetime)) { throw new TypeError('The messageCacheLifetime option must be a number.'); diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index ceac04d75..8e2eba3ac 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -323,7 +323,7 @@ class TextBasedChannel { } _cacheMessage(message) { - const maxSize = this.client.options.maxMessageCache; + const maxSize = this.client.options.messageCacheMaxSize; if (maxSize === 0) return null; if (this.messages.size >= maxSize) this.messages.delete(this.messages.keys().next().value); diff --git a/src/util/Constants.js b/src/util/Constants.js index b45a91474..e4422002b 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -7,7 +7,7 @@ exports.Package = require('../../package.json'); * the order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order. * @property {number} [shardId=0] The ID of this shard * @property {number} [shardCount=0] The number of shards - * @property {number} [maxMessageCache=200] Number of messages to cache per channel + * @property {number} [messageCacheMaxSize=200] Maximum number of messages to cache per channel * @property {number} [messageCacheLifetime=0] How long until a message should be uncached by the message sweeping * (in seconds, 0 for forever) * @property {number} [messageSweepInterval=0] How frequently to remove messages from the cache that are older than @@ -26,7 +26,7 @@ exports.DefaultOptions = { apiRequestMethod: 'sequential', shardId: 0, shardCount: 0, - maxMessageCache: 200, + messageCacheMaxSize: 200, messageCacheLifetime: 0, messageSweepInterval: 0, fetchAllMembers: false, From bd7ff36b665ddaa5ede265d3adf6f2374bf9d039 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sun, 9 Oct 2016 15:22:14 -0400 Subject: [PATCH 085/188] Allow infinite messageCacheMaxSize --- docs/docs.json | 2 +- src/structures/interface/TextBasedChannel.js | 3 +-- src/util/Constants.js | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 6a4f80fca..12531fd9b 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476040482243},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":223,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":232,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":252,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":267,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":277,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":290,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":121,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":139,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":145,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":160,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":169,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":178,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":187,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":200,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":391,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":397,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":86,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":101,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":114,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":141,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":155,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":165,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guild_id","name":"guild_id","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channel_id","name":"channel_id","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":58,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":338,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[],"implements":["TextBasedChannel#fetchWebhooks"]},{"id":"TextChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextChannel","meta":{"line":347,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchWebhook"]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":361,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}],"implements":["TextBasedChannel#createWebhook"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":6,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":86,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":101,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":114,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":141,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":155,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":165,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guild_id","name":"guild_id","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channel_id","name":"channel_id","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":58,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"id":"TextBasedChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextBasedChannel","meta":{"line":338,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"TextBasedChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextBasedChannel","meta":{"line":347,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextBasedChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":361,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":67,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476040904710},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":223,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":232,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":252,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":267,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":277,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":290,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":121,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":139,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":145,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":160,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":169,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":178,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":187,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":200,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":391,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":397,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":86,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":101,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":114,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":141,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":155,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":165,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guild_id","name":"guild_id","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channel_id","name":"channel_id","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":58,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":337,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[],"implements":["TextBasedChannel#fetchWebhooks"]},{"id":"TextChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextChannel","meta":{"line":346,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchWebhook"]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":360,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}],"implements":["TextBasedChannel#createWebhook"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":6,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":86,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":101,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":114,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":141,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":155,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":165,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guild_id","name":"guild_id","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channel_id","name":"channel_id","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":58,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"id":"TextBasedChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextBasedChannel","meta":{"line":337,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"TextBasedChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextBasedChannel","meta":{"line":346,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextBasedChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":360,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":67,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 8e2eba3ac..23d3a4942 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -325,8 +325,7 @@ class TextBasedChannel { _cacheMessage(message) { const maxSize = this.client.options.messageCacheMaxSize; if (maxSize === 0) return null; - if (this.messages.size >= maxSize) this.messages.delete(this.messages.keys().next().value); - + if (this.messages.size >= maxSize && maxSize > 0) this.messages.delete(this.messages.firstKey()); this.messages.set(message.id, message); return message; } diff --git a/src/util/Constants.js b/src/util/Constants.js index e4422002b..f816d84b4 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -8,6 +8,7 @@ exports.Package = require('../../package.json'); * @property {number} [shardId=0] The ID of this shard * @property {number} [shardCount=0] The number of shards * @property {number} [messageCacheMaxSize=200] Maximum number of messages to cache per channel + * (-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely) * @property {number} [messageCacheLifetime=0] How long until a message should be uncached by the message sweeping * (in seconds, 0 for forever) * @property {number} [messageSweepInterval=0] How frequently to remove messages from the cache that are older than From e7745a0af5b4800e6aa38aa69c12417d7d62560e Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sun, 9 Oct 2016 15:30:46 -0400 Subject: [PATCH 086/188] Clean up some webhook stuff --- docs/docs.json | 2 +- src/structures/Guild.js | 16 +++--- src/structures/TextChannel.js | 2 +- src/structures/Webhook.js | 23 +++++---- src/structures/interface/TextBasedChannel.js | 54 ++++++++++---------- 5 files changed, 49 insertions(+), 48 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 12531fd9b..13ab6a6a6 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476040904710},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":223,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":232,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":252,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":267,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":277,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":290,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":121,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":139,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":145,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":160,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":169,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":178,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":187,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":200,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":391,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":397,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":86,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":101,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":114,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":141,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":155,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":165,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guild_id","name":"guild_id","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channel_id","name":"channel_id","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":58,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":337,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[],"implements":["TextBasedChannel#fetchWebhooks"]},{"id":"TextChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextChannel","meta":{"line":346,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchWebhook"]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":360,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}],"implements":["TextBasedChannel#createWebhook"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":6,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":86,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":101,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":114,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":141,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":155,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":165,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guild_id","name":"guild_id","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channel_id","name":"channel_id","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":58,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"id":"TextBasedChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextBasedChannel","meta":{"line":337,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"TextBasedChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextBasedChannel","meta":{"line":346,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextBasedChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":360,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":67,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476041423830},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":223,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":232,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":252,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":267,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":277,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":290,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":121,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":139,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":145,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":160,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":169,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":178,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":187,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":200,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":391,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":397,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":102,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":115,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":142,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":158,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":180,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":361,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":361,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchWebhook"]},{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":325,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[],"implements":["TextBasedChannel#fetchWebhooks"]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":339,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}],"implements":["TextBasedChannel#createWebhook"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":361,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":102,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":115,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":142,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":158,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":180,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextBasedChannel","meta":{"line":325,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"TextBasedChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextBasedChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":339,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":361,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 89e9cface..ad40214b1 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -296,6 +296,14 @@ class Guild { return this.client.rest.methods.getGuildInvites(this); } + /** + * Fetch all webhooks for the guild. + * @returns {Collection} + */ + fetchWebhooks() { + return this.client.rest.methods.fetchGuildWebhooks(this); + } + /** * Fetch a single guild member from a user. * @param {UserResolvable} user The user to fetch the member for @@ -622,14 +630,6 @@ class Guild { return this.client.rest.methods.deleteGuild(this); } - /** - * Fetch all webhooks for the guild. - * @returns {Collection} - */ - fetchWebhooks() { - return this.client.rest.methods.fetchGuildWebhooks(this); - } - /** * Whether this Guild equals another Guild. It compares all properties, so for most operations * it is advisable to just compare `guild.id === guild2.id` as it is much faster and is often diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index d6440cea3..cc1319541 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -56,10 +56,10 @@ class TextChannel extends GuildChannel { get typingCount() { return; } createCollector() { return; } awaitMessages() { return; } - bulkDelete() { return; } fetchWebhook() { return; } fetchWebhooks() { return; } createWebhook() { return; } + bulkDelete() { return; } _cacheMessage() { return; } } diff --git a/src/structures/Webhook.js b/src/structures/Webhook.js index 1431c863e..d9e75d3af 100644 --- a/src/structures/Webhook.js +++ b/src/structures/Webhook.js @@ -1,4 +1,5 @@ const path = require('path'); +const escapeMarkdown = require('../util/EscapeMarkdown'); /** * Represents a Webhook @@ -49,13 +50,13 @@ class Webhook { * The guild the Webhook belongs to * @type {string} */ - this.guild_id = data.guild_id; + this.guildID = data.guild_id; /** * The channel the Webhook belongs to * @type {string} */ - this.channel_id = data.channel_id; + this.channelID = data.channel_id; /** * The owner of the Webhook @@ -144,18 +145,10 @@ class Webhook { if (!options.split.prepend) options.split.prepend = `\`\`\`${lang ? lang : ''}\n`; if (!options.split.append) options.split.append = '\n```'; } - content = this.client.resolver.resolveString(content).replace(/```/g, '`\u200b``'); + content = escapeMarkdown(this.client.resolver.resolveString(content), true); return this.sendMessage(`\`\`\`${lang ? lang : ''}\n${content}\n\`\`\``, options); } - /** - * Delete the Webhook - * @returns {Promise} - */ - delete() { - return this.client.rest.methods.deleteChannelWebhook(this); - } - /** * Edit the Webhook. * @param {string} name The new name for the Webhook @@ -179,6 +172,14 @@ class Webhook { } }); } + + /** + * Delete the Webhook + * @returns {Promise} + */ + delete() { + return this.client.rest.methods.deleteChannelWebhook(this); + } } module.exports = Webhook; diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 23d3a4942..2f25c6b0d 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -310,24 +310,12 @@ class TextBasedChannel { } /** - * Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after. - * Only OAuth Bot accounts may use this method. - * @param {Collection|Message[]} messages The messages to delete - * @returns {Collection} + * Fetch a webhook by ID + * @param {string} id The id of the webhook. + * @returns {Promise} */ - bulkDelete(messages) { - if (messages instanceof Collection) messages = messages.array(); - if (!(messages instanceof Array)) return Promise.reject(new TypeError('Messages must be an Array or Collection.')); - const messageIDs = messages.map(m => m.id); - return this.client.rest.methods.bulkDeleteMessages(this, messageIDs); - } - - _cacheMessage(message) { - const maxSize = this.client.options.messageCacheMaxSize; - if (maxSize === 0) return null; - if (this.messages.size >= maxSize && maxSize > 0) this.messages.delete(this.messages.firstKey()); - this.messages.set(message.id, message); - return message; + fetchWebhook(id) { + return this.client.rest.methods.fetchWebhook(id); } /** @@ -338,15 +326,6 @@ class TextBasedChannel { return this.client.rest.methods.fetchChannelWebhooks(this); } - /** - * Fetch a webhook by ID - * @param {string} id The id of the webhook. - * @returns {Promise} - */ - fetchWebhook(id) { - return this.client.rest.methods.fetchWebhook(id); - } - /** * Create a webhook for the channel. * @param {string} name The name of the webhook. @@ -372,6 +351,27 @@ class TextBasedChannel { } }); } + + /** + * Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after. + * Only OAuth Bot accounts may use this method. + * @param {Collection|Message[]} messages The messages to delete + * @returns {Collection} + */ + bulkDelete(messages) { + if (messages instanceof Collection) messages = messages.array(); + if (!(messages instanceof Array)) return Promise.reject(new TypeError('Messages must be an Array or Collection.')); + const messageIDs = messages.map(m => m.id); + return this.client.rest.methods.bulkDeleteMessages(this, messageIDs); + } + + _cacheMessage(message) { + const maxSize = this.client.options.messageCacheMaxSize; + if (maxSize === 0) return null; + if (this.messages.size >= maxSize && maxSize > 0) this.messages.delete(this.messages.firstKey()); + this.messages.set(message.id, message); + return message; + } } exports.applyToClass = (structure, full = false) => { @@ -388,8 +388,8 @@ exports.applyToClass = (structure, full = false) => { props.push('fetchPinnedMessages'); props.push('createCollector'); props.push('awaitMessages'); - props.push('fetchWebhooks'); props.push('fetchWebhook'); + props.push('fetchWebhooks'); props.push('createWebhook'); } for (const prop of props) applyProp(structure, prop); From 29b33bffaab577f019445614c95d6c13b7704a9d Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sun, 9 Oct 2016 15:50:50 -0400 Subject: [PATCH 087/188] Rearrange and clean up more webhook stuff --- docs/docs.json | 2 +- src/client/Client.js | 9 ++++ src/client/rest/RESTMethods.js | 46 +++++++++----------- src/structures/Guild.js | 2 +- src/structures/TextChannel.js | 35 +++++++++++++-- src/structures/Webhook.js | 6 +-- src/structures/interface/TextBasedChannel.js | 46 -------------------- 7 files changed, 66 insertions(+), 80 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 13ab6a6a6..2dab3858e 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476041423830},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":223,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":232,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":252,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":267,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":277,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":290,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":121,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":139,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":145,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":160,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":169,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":178,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":187,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":200,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":391,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":397,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":102,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":115,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":142,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":158,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":180,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":361,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":361,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchWebhook"]},{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":325,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[],"implements":["TextBasedChannel#fetchWebhooks"]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":339,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}],"implements":["TextBasedChannel#createWebhook"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":361,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":102,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":115,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":142,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":158,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":180,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextBasedChannel","meta":{"line":325,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"TextBasedChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextBasedChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":339,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":361,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476042616008},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":223,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":232,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":252,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":267,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":277,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":287,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":299,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":121,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":139,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":145,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":160,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":169,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":178,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":187,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":200,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":400,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":406,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":102,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":115,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":142,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":158,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":180,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":102,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":115,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":142,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":158,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":180,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/client/Client.js b/src/client/Client.js index ab2664064..0117b339c 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -279,6 +279,15 @@ class Client extends EventEmitter { return this.rest.methods.getInvite(code); } + /** + * Fetch a webhook by ID. + * @param {string} id ID of the webhook + * @returns {Promise} + */ + fetchWebhook(id) { + return this.rest.methods.getWebhook(id); + } + /** * Sweeps all channels' messages and removes the ones older than the max message lifetime. * If the message has been edited, the time of the edit is used rather than the time of the original message. diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 52de7080c..c456aa76d 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -539,7 +539,16 @@ class RESTMethods { }); } - fetchGuildWebhooks(guild) { + getWebhook(id, token) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('get', Constants.Endpoints.webhook(id, token), require('util').isUndefined(token)) + .then(data => { + resolve(new Webhook(this.rest.client, data)); + }).catch(reject); + }); + } + + getGuildWebhooks(guild) { return new Promise((resolve, reject) => { this.rest.makeRequest('get', Constants.Endpoints.guildWebhooks(guild.id), true) .then(data => { @@ -552,7 +561,7 @@ class RESTMethods { }); } - fetchChannelWebhooks(channel) { + getChannelWebhooks(channel) { return new Promise((resolve, reject) => { this.rest.makeRequest('get', Constants.Endpoints.channelWebhooks(channel.id), true) .then(data => { @@ -565,19 +574,11 @@ class RESTMethods { }); } - fetchWebhook(id, token) { - return new Promise((resolve, reject) => { - this.rest.makeRequest('get', Constants.Endpoints.webhook(id, token), require('util').isUndefined(token)) - .then(data => { - resolve(new Webhook(this.rest.client, data)); - }).catch(reject); - }); - } - - createChannelWebhook(channel, name, avatar) { + createWebhook(channel, name, avatar) { return new Promise((resolve, reject) => { this.rest.makeRequest('post', Constants.Endpoints.channelWebhooks(channel.id), true, { - name: name, avatar: avatar, + name, + avatar, }) .then(data => { resolve(new Webhook(this.rest.client, data)); @@ -585,22 +586,15 @@ class RESTMethods { }); } - deleteChannelWebhook(webhook) { - return new Promise((resolve, reject) => { - this.rest.makeRequest('delete', Constants.Endpoints.webhook(webhook.id, webhook.token), false) - .then(resolve).catch(reject); + editWebhook(webhook, name, avatar) { + return this.rest.makeRequest('patch', Constants.Endpoints.webhook(webhook.id, webhook.token), false, { + name, + avatar, }); } - editChannelWebhook(webhook, name, avatar) { - return new Promise((resolve, reject) => { - this.rest.makeRequest('patch', Constants.Endpoints.webhook(webhook.id, webhook.token), false, { - name: name, avatar: avatar, - }) - .then(data => { - resolve(data); - }).catch(reject); - }); + deleteWebhook(webhook) { + return this.rest.makeRequest('delete', Constants.Endpoints.webhook(webhook.id, webhook.token), false); } sendWebhookMessage(webhook, content, { avatarURL, tts, disableEveryone, embeds } = {}, file = null) { diff --git a/src/structures/Guild.js b/src/structures/Guild.js index ad40214b1..d8dae531f 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -301,7 +301,7 @@ class Guild { * @returns {Collection} */ fetchWebhooks() { - return this.client.rest.methods.fetchGuildWebhooks(this); + return this.client.rest.methods.getGuildWebhooks(this); } /** diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index cc1319541..8c0d8974a 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -42,6 +42,38 @@ class TextChannel extends GuildChannel { return members; } + /** + * Fetch all webhooks for the channel. + * @returns {Promise>} + */ + fetchWebhooks() { + return this.client.rest.methods.getChannelWebhooks(this); + } + + /** + * Create a webhook for the channel. + * @param {string} name The name of the webhook. + * @param {FileResolvable} avatar The avatar for the webhook. + * @returns {Promise} webhook The created webhook. + * @example + * channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png') + * .then(webhook => console.log(`Created Webhook ${webhook}`)) + * .catch(console.log) + */ + createWebhook(name, avatar) { + return new Promise((resolve, reject) => { + if (avatar) { + this.client.resolver.resolveFile(avatar).then(file => { + let base64 = new Buffer(file, 'binary').toString('base64'); + let dataURI = `data:;base64,${base64}`; + this.client.rest.methods.createWebhook(this, name, dataURI).then(resolve).catch(reject); + }).catch(reject); + } else { + this.client.rest.methods.createWebhook(this, name).then(resolve).catch(reject); + } + }); + } + // These are here only for documentation purposes - they are implemented by TextBasedChannel sendMessage() { return; } sendTTSMessage() { return; } @@ -56,9 +88,6 @@ class TextChannel extends GuildChannel { get typingCount() { return; } createCollector() { return; } awaitMessages() { return; } - fetchWebhook() { return; } - fetchWebhooks() { return; } - createWebhook() { return; } bulkDelete() { return; } _cacheMessage() { return; } } diff --git a/src/structures/Webhook.js b/src/structures/Webhook.js index d9e75d3af..53c89e31a 100644 --- a/src/structures/Webhook.js +++ b/src/structures/Webhook.js @@ -161,11 +161,11 @@ class Webhook { this.client.resolver.resolveFile(avatar).then(file => { let base64 = new Buffer(file, 'binary').toString('base64'); let dataURI = `data:;base64,${base64}`; - this.client.rest.methods.editChannelWebhook(this, name, dataURI) + this.client.rest.methods.editWebhook(this, name, dataURI) .then(resolve).catch(reject); }).catch(reject); } else { - this.client.rest.methods.editChannelWebhook(this, name) + this.client.rest.methods.editWebhook(this, name) .then(data => { this.setup(data); }).catch(reject); @@ -178,7 +178,7 @@ class Webhook { * @returns {Promise} */ delete() { - return this.client.rest.methods.deleteChannelWebhook(this); + return this.client.rest.methods.deleteWebhook(this); } } diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 2f25c6b0d..a772d1590 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -309,49 +309,6 @@ class TextBasedChannel { }); } - /** - * Fetch a webhook by ID - * @param {string} id The id of the webhook. - * @returns {Promise} - */ - fetchWebhook(id) { - return this.client.rest.methods.fetchWebhook(id); - } - - /** - * Fetch all webhooks for the channel. - * @returns {Collection} - */ - fetchWebhooks() { - return this.client.rest.methods.fetchChannelWebhooks(this); - } - - /** - * Create a webhook for the channel. - * @param {string} name The name of the webhook. - * @param {FileResolvable=} avatar The avatar for the webhook. - * @returns {Webhook} webhook The created webhook. - * @example - * channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png') - * .then(webhook => console.log(`Created Webhook ${webhook}`)) - * .catch(console.log) - */ - createWebhook(name, avatar) { - return new Promise((resolve, reject) => { - if (avatar) { - this.client.resolver.resolveFile(avatar).then(file => { - let base64 = new Buffer(file, 'binary').toString('base64'); - let dataURI = `data:;base64,${base64}`; - this.client.rest.methods.createChannelWebhook(this, name, dataURI) - .then(resolve).catch(reject); - }).catch(reject); - } else { - this.client.rest.methods.createChannelWebhook(this, name) - .then(resolve).catch(reject); - } - }); - } - /** * Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after. * Only OAuth Bot accounts may use this method. @@ -388,9 +345,6 @@ exports.applyToClass = (structure, full = false) => { props.push('fetchPinnedMessages'); props.push('createCollector'); props.push('awaitMessages'); - props.push('fetchWebhook'); - props.push('fetchWebhooks'); - props.push('createWebhook'); } for (const prop of props) applyProp(structure, prop); }; From e48d7d52f142fb2ebd89c15de1ce725f48045aef Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Mon, 10 Oct 2016 00:56:18 -0500 Subject: [PATCH 088/188] add webhook#sendSlackMessage (#788) --- docs/docs.json | 2 +- src/client/rest/RESTMethods.js | 13 +++++++++++++ src/structures/Webhook.js | 27 ++++++++++++++++++++++++--- 3 files changed, 38 insertions(+), 4 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 2dab3858e..85770b6ca 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476042616008},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":223,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":232,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":252,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":267,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":277,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":287,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":299,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":121,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":139,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":145,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":160,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":169,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":178,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":187,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":200,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":400,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":406,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":102,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":115,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":142,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":158,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":180,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":102,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":115,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":142,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":158,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":180,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476077448403},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":223,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":232,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":252,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":267,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":277,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":287,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":299,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":121,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":139,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":145,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":160,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":169,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":178,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":187,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":200,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":400,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":406,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.array()[0];\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index c456aa76d..d9b8b14da 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -613,6 +613,19 @@ class RESTMethods { }).catch(reject); }); } + + sendSlackWebhookMessage(webhook, body) { + return new Promise((resolve, reject) => { + this.rest.makeRequest( + 'post', + `${Constants.Endpoints.webhook(webhook.id, webhook.token)}/slack?wait=true`, + false, + body + ).then(data => { + resolve(data); + }).catch(reject); + }); + } } module.exports = RESTMethods; diff --git a/src/structures/Webhook.js b/src/structures/Webhook.js index 53c89e31a..0e94e8ff6 100644 --- a/src/structures/Webhook.js +++ b/src/structures/Webhook.js @@ -75,12 +75,12 @@ class Webhook { /** * Send a message with this webhook - * @param {StringResolvable} content The content to send - * @param {MessageOptions} [options={}] The options to provide + * @param {StringResolvable} content The content to send. + * @param {MessageOptions} [options={}] The options to provide. * @returns {Promise} * @example * // send a message - * webook.sendMessage('hello!') + * webhook.sendMessage('hello!') * .then(message => console.log(`Sent message: ${message.content}`)) * .catch(console.error); */ @@ -88,6 +88,27 @@ class Webhook { return this.client.rest.methods.sendWebhookMessage(this, content, options); } + /** + * Send a raw slack message with this webhook + * @param {Object} body The raw body to send. + * @returns {Promise} + * @example + * // send a slack message + * webhook.sendSlackMessage({ + * 'username': 'Wumpus', + * 'attachments': [{ + * 'pretext': 'this looks pretty cool', + * 'color': '#F0F', + * 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png', + * 'footer': 'Powered by sneks', + * 'ts': new Date().getTime() / 1000 + * }] + * }).catch(console.log); + */ + sendSlackMessage(body) { + return this.client.rest.methods.sendSlackWebhookMessage(this, body); + } + /** * Send a text-to-speech message with this webhook * @param {StringResolvable} content The content to send From 5ddefc3682cf51d20968bd55fb2c60e9f0da4a89 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Mon, 10 Oct 2016 01:54:46 -0500 Subject: [PATCH 089/188] fix webhook#edit (#789) * fix webhook#edit * hehe --- src/client/rest/RESTMethods.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index d9b8b14da..82822635e 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -587,9 +587,15 @@ class RESTMethods { } editWebhook(webhook, name, avatar) { - return this.rest.makeRequest('patch', Constants.Endpoints.webhook(webhook.id, webhook.token), false, { - name, - avatar, + return new Promise((resolve, reject) => { + this.rest.makeRequest('patch', Constants.Endpoints.webhook(webhook.id, webhook.token), false, { + name, + avatar, + }).then(data => { + webhook.name = data.name; + webhook.avatar = data.avatar; + resolve(webhook); + }).catch(reject); }); } From 32eeb8ad5ec70bc2eaae7a0dbef8984f7cd919b6 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Mon, 10 Oct 2016 01:55:09 -0500 Subject: [PATCH 090/188] Fix feature/login (#790) * eeeeeeee * too tired * ok gawdl3y Signed-off-by: Gus Caplan --- src/client/Client.js | 2 +- src/client/rest/RESTMethods.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/client/Client.js b/src/client/Client.js index 0117b339c..b2ed42f1e 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -20,7 +20,7 @@ class Client extends EventEmitter { /** * @param {ClientOptions} [options] Options for the client */ - constructor(options) { + constructor(options = {}) { super(); // Obtain shard details from environment diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 82822635e..fed7ab7fd 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -15,6 +15,7 @@ class RESTMethods { } loginToken(token) { + token = token.replace('Bot ', ''); return new Promise((resolve, reject) => { this.rest.client.manager.connectToWebSocket(token, resolve, reject); }); @@ -27,7 +28,7 @@ class RESTMethods { this.rest.client.password = password; this.rest.makeRequest('post', Constants.Endpoints.login, false, { email, password }) .then(data => { - this.rest.client.manager.connectToWebSocket(data.token, resolve, reject); + resolve(this.loginToken(data.token)); }) .catch(reject); }); From 96355a4968e258581c2a669f8c23fd24e8e2899b Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Mon, 10 Oct 2016 14:53:54 -0500 Subject: [PATCH 091/188] add constants, some debug stuff (#791) * add constants, some debug stuff * i can't believe i did this --- src/client/ClientManager.js | 1 + src/client/websocket/WebSocketManager.js | 2 +- src/client/websocket/packets/WebSocketPacketManager.js | 2 ++ src/util/Constants.js | 2 ++ 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/client/ClientManager.js b/src/client/ClientManager.js index 552554b7a..dc255cfcf 100644 --- a/src/client/ClientManager.js +++ b/src/client/ClientManager.js @@ -49,6 +49,7 @@ class ClientManager { */ setupKeepAlive(time) { this.heartbeatInterval = this.client.setInterval(() => { + this.client.emit('debug', 'SENDING HEARTBEAT'); this.client.ws.send({ op: Constants.OPCodes.HEARTBEAT, d: this.client.ws.sequence, diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index aee234cc5..bc22249d2 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -221,7 +221,7 @@ class WebSocketManager extends EventEmitter { this.client.emit('raw', packet); - if (packet.op === 10) this.client.manager.setupKeepAlive(packet.d.heartbeat_interval); + if (packet.op === Constants.OPCodes.HELLO) this.client.manager.setupKeepAlive(packet.d.heartbeat_interval); return this.packetManager.handle(packet); } diff --git a/src/client/websocket/packets/WebSocketPacketManager.js b/src/client/websocket/packets/WebSocketPacketManager.js index 0c2b025cc..4edf566f2 100644 --- a/src/client/websocket/packets/WebSocketPacketManager.js +++ b/src/client/websocket/packets/WebSocketPacketManager.js @@ -77,6 +77,8 @@ class WebSocketPacketManager { return false; } + if (packet.op === Constants.OPCodes.HEARTBEAT_ACK) this.ws.client.emit('debug', 'HEARTBEAT ACK'); + if (this.ws.status === Constants.Status.RECONNECTING) { this.ws.reconnecting = false; this.ws.checkIfReady(); diff --git a/src/util/Constants.js b/src/util/Constants.js index f816d84b4..91486f935 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -140,6 +140,8 @@ exports.OPCodes = { RECONNECT: 7, REQUEST_GUILD_MEMBERS: 8, INVALID_SESSION: 9, + HELLO: 10, + HEARTBEAT_ACK: 11, }; exports.VoiceOPCodes = { From 0de3d1bfc49a9021dd6b9965b670f116e16594c5 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Tue, 11 Oct 2016 19:20:59 -0500 Subject: [PATCH 092/188] make sharding manager constructor better (#794) * add color stuff to support popular color libraries * make this better * fix docs --- docs/docs.json | 2 +- src/sharding/Shard.js | 5 +++-- src/sharding/ShardingManager.js | 29 +++++++++++++++++++---------- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 85770b6ca..b5a16892a 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476077448403},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":223,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":232,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":252,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":267,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":277,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":287,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":299,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":121,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":139,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":145,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":160,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":169,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":178,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":187,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":200,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":400,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":406,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.array()[0];\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476173357011},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":223,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":232,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":252,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":267,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":277,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":287,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":299,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":121,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":139,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":145,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":160,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":169,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":178,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":187,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":200,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":400,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":406,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"spawnArgs=","description":"Optional command line arguments to pass to the shard","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":52,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":70,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":98,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"The options for the sharding manager.","type":{"types":[[["Object",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":71,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":124,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":135,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":150,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":51,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#spawnArgs","name":"spawnArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["array",""]]]},"meta":{"line":57,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":74,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.array()[0];\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file diff --git a/src/sharding/Shard.js b/src/sharding/Shard.js index 1c454d048..647a0a2cf 100644 --- a/src/sharding/Shard.js +++ b/src/sharding/Shard.js @@ -10,8 +10,9 @@ class Shard { /** * @param {ShardingManager} manager The sharding manager * @param {number} id The ID of this shard + * @param {array} [spawnArgs=] Optional command line arguments to pass to the shard */ - constructor(manager, id) { + constructor(manager, id, spawnArgs = []) { /** * Manager that created the shard * @type {ShardingManager} @@ -28,7 +29,7 @@ class Shard { * Process of the shard * @type {ChildProcess} */ - this.process = childProcess.fork(path.resolve(this.manager.file), [], { + this.process = childProcess.fork(path.resolve(this.manager.file), spawnArgs, { env: { SHARD_ID: this.id, SHARD_COUNT: this.manager.totalShards, diff --git a/src/sharding/ShardingManager.js b/src/sharding/ShardingManager.js index da4df2d56..6272709c2 100644 --- a/src/sharding/ShardingManager.js +++ b/src/sharding/ShardingManager.js @@ -1,7 +1,7 @@ const path = require('path'); const fs = require('fs'); const EventEmitter = require('events').EventEmitter; - +const mergeDefault = require('../util/MergeDefault'); const Shard = require('./Shard'); const Collection = require('../util/Collection'); @@ -14,12 +14,13 @@ const Collection = require('../util/Collection'); class ShardingManager extends EventEmitter { /** * @param {string} file Path to your shard script file - * @param {number} [totalShards=1] Number of shards to default to spawning - * @param {boolean} [respawn=true] Respawn a shard when it dies + * @param {Object} options The options for the sharding manager. */ - constructor(file, totalShards = 1, respawn = true) { + constructor(file, options = {}) { super(); + options = mergeDefault({ totalShards: 1, respawn: true, spawnArgs: [] }, options); + /** * Path to the shard script file * @type {string} @@ -34,18 +35,26 @@ class ShardingManager extends EventEmitter { * Amount of shards that this manager is going to spawn * @type {number} */ - this.totalShards = totalShards; - if (typeof totalShards !== 'number' || isNaN(totalShards)) { + if (typeof options.totalShards !== 'number' || isNaN(options.totalShards)) { throw new TypeError('Amount of shards must be a number.'); } - if (totalShards < 1) throw new RangeError('Amount of shards must be at least 1.'); - if (totalShards !== Math.floor(totalShards)) throw new RangeError('Amount of shards must be an integer.'); + if (options.totalShards < 1) throw new RangeError('Amount of shards must be at least 1.'); + if (options.totalShards !== Math.floor(options.totalShards)) { + throw new RangeError('Amount of shards must be an integer.'); + } + this.totalShards = options.totalShards; /** * Whether shards should automatically respawn upon exiting * @type {boolean} */ - this.respawn = respawn; + this.respawn = options.respawn; + + /** + * An array of arguments to pass to shards. + * @type {array} + */ + this.spawnArgs = options.spawnArgs; /** * A collection of shards that this manager has spawned @@ -60,7 +69,7 @@ class ShardingManager extends EventEmitter { * @returns {Promise} */ createShard(id = this.shards.size) { - const shard = new Shard(this, id); + const shard = new Shard(this, id, this.spawnArgs); this.shards.set(id, shard); /** * Emitted upon launching a shard From 299484ff68a639938eabfb0288c2f4e8701c5aed Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Tue, 11 Oct 2016 19:29:29 -0500 Subject: [PATCH 093/188] allow overwritePermissions to take a role id (#792) * allow overwritePermissions to take a role id * Fix typo --- docs/docs.json | 2 +- src/structures/GuildChannel.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index b5a16892a..fcebb6f9e 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476173357011},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":223,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":232,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":252,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":267,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":277,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":287,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":299,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":121,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":139,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":145,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":160,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":169,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":178,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":187,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":200,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":400,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":406,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"spawnArgs=","description":"Optional command line arguments to pass to the shard","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":52,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":70,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":98,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"The options for the sharding manager.","type":{"types":[[["Object",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":71,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":124,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":135,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":150,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":51,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#spawnArgs","name":"spawnArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["array",""]]]},"meta":{"line":57,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":74,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.array()[0];\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476231958722},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":223,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":232,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":252,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":267,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":277,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":287,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":299,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":121,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":139,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":145,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":160,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":169,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":178,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":187,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":200,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":400,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":406,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"spawnArgs=","description":"Optional command line arguments to pass to the shard","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":52,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":70,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":98,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"The options for the sharding manager.","type":{"types":[[["Object",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":71,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":124,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":135,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":150,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":51,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#spawnArgs","name":"spawnArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["array",""]]]},"meta":{"line":57,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":74,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.array()[0];\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolveable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolveable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolveable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index 417500d9c..3eb97a4f6 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -111,7 +111,7 @@ class GuildChannel extends Channel { /** * Overwrites the permissions for a user or role in this channel. - * @param {Role|UserResolvable} userOrRole The user or role to update + * @param {RoleResolvable|UserResolvable} userOrRole The user or role to update * @param {PermissionOverwriteOptions} options The configuration for the update * @returns {Promise} * @example @@ -130,6 +130,9 @@ class GuildChannel extends Channel { if (userOrRole instanceof Role) { payload.type = 'role'; + } else if (this.guild.roles.has(userOrRole)) { + userOrRole = this.guild.roles.get(userOrRole); + payload.type = 'role'; } else { userOrRole = this.client.resolver.resolveUser(userOrRole); payload.type = 'member'; From 26804f36736a0dcc9b9d13d29477acc3f6534cb7 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Wed, 12 Oct 2016 02:26:50 -0400 Subject: [PATCH 094/188] Reorganise resolver --- src/client/ClientDataResolver.js | 58 ++++++++++++++++---------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/src/client/ClientDataResolver.js b/src/client/ClientDataResolver.js index f8f027e0d..60870d8c0 100644 --- a/src/client/ClientDataResolver.js +++ b/src/client/ClientDataResolver.js @@ -99,23 +99,6 @@ class ClientDataResolver { return guild.members.get(user.id) || null; } - /** - * Data that resolves to give a Base64 string, typically for image uploading. This can be: - * * A Buffer - * * A Base64 string - * @typedef {Buffer|string} Base64Resolvable - */ - - /** - * Resolves a Base64Resolvable to a Base 64 image - * @param {Base64Resolvable} data The base 64 resolvable you want to resolve - * @returns {?string} - */ - resolveBase64(data) { - if (data instanceof Buffer) return `data:image/jpg;base64,${data.toString('base64')}`; - return data; - } - /** * Data that can be resolved to give a Channel. This can be: * * An instance of a Channel @@ -138,6 +121,26 @@ class ClientDataResolver { return null; } + /** + * Data that can be resolved to give an invite code. This can be: + * * An invite code + * * An invite URL + * @typedef {string} InviteResolvable + */ + + /** + * Resolves InviteResolvable to an invite code + * @param {InviteResolvable} data The invite resolvable to resolve + * @returns {string} + */ + resolveInviteCode(data) { + const inviteRegex = /discord(?:app)?\.(?:gg|com\/invite)\/([a-z0-9]{5})/i; + const match = inviteRegex.exec(data); + + if (match && match[1]) return match[1]; + return data; + } + /** * Data that can be resolved to give a permission number. This can be: * * A string @@ -206,22 +209,19 @@ class ClientDataResolver { } /** - * Data that can be resolved to give an invite code. This can be: - * * An invite code - * * An invite URL - * @typedef {string} InviteResolvable + * Data that resolves to give a Base64 string, typically for image uploading. This can be: + * * A Buffer + * * A Base64 string + * @typedef {Buffer|string} Base64Resolvable */ /** - * Resolves InviteResolvable to an invite code - * @param {InviteResolvable} data The invite resolvable to resolve - * @returns {string} + * Resolves a Base64Resolvable to a Base 64 image + * @param {Base64Resolvable} data The base 64 resolvable you want to resolve + * @returns {?string} */ - resolveInviteCode(data) { - const inviteRegex = /discord(?:app)?\.(?:gg|com\/invite)\/([a-z0-9]{5})/i; - const match = inviteRegex.exec(data); - - if (match && match[1]) return match[1]; + resolveBase64(data) { + if (data instanceof Buffer) return `data:image/jpg;base64,${data.toString('base64')}`; return data; } From 492f706035d9872d37f076659d8e5b95846e0bbd Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Thu, 13 Oct 2016 20:05:07 -0400 Subject: [PATCH 095/188] Fix Gus' log messages --- src/client/ClientManager.js | 2 +- src/client/websocket/packets/WebSocketPacketManager.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/ClientManager.js b/src/client/ClientManager.js index dc255cfcf..89acc523a 100644 --- a/src/client/ClientManager.js +++ b/src/client/ClientManager.js @@ -49,7 +49,7 @@ class ClientManager { */ setupKeepAlive(time) { this.heartbeatInterval = this.client.setInterval(() => { - this.client.emit('debug', 'SENDING HEARTBEAT'); + this.client.emit('debug', 'Sending heartbeat'); this.client.ws.send({ op: Constants.OPCodes.HEARTBEAT, d: this.client.ws.sequence, diff --git a/src/client/websocket/packets/WebSocketPacketManager.js b/src/client/websocket/packets/WebSocketPacketManager.js index 4edf566f2..31e08d0fb 100644 --- a/src/client/websocket/packets/WebSocketPacketManager.js +++ b/src/client/websocket/packets/WebSocketPacketManager.js @@ -77,7 +77,7 @@ class WebSocketPacketManager { return false; } - if (packet.op === Constants.OPCodes.HEARTBEAT_ACK) this.ws.client.emit('debug', 'HEARTBEAT ACK'); + if (packet.op === Constants.OPCodes.HEARTBEAT_ACK) this.ws.client.emit('debug', 'Heartbeat acknowledged'); if (this.ws.status === Constants.Status.RECONNECTING) { this.ws.reconnecting = false; From 853a3dfa04ab1d21a94888a962edf25068a0b955 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Thu, 13 Oct 2016 22:26:10 -0500 Subject: [PATCH 096/188] Add getRecommendedShards and automatic shard count in ShardingManager (#796) * draft stuff fix docstring for Client#token Reorganise resolver make env better for shards, clean up docs Fix Gus' log messages 7 meh just gateway/bot not v7 :( final changes, ready for mergin! build docs make default totalShards 'auto', fix docs for totalShards type clean up docs more run docs * make consistancy real * Update and rename getRecommendedShards.js to GetRecommendedShards.js * Update GetRecommendedShards.js * Update index.js * Update RESTMethods.js * Update Shard.js * Update GetRecommendedShards.js * Update ShardingManager.js * run docs --- docs/docs.json | 2 +- src/client/Client.js | 14 +++++--- src/client/rest/RESTMethods.js | 6 +++- src/index.js | 1 + src/sharding/Shard.js | 17 +++++++--- src/sharding/ShardingManager.js | 56 ++++++++++++++++++++++++-------- src/util/Constants.js | 1 + src/util/GetRecommendedShards.js | 19 +++++++++++ 8 files changed, 90 insertions(+), 26 deletions(-) create mode 100644 src/util/GetRecommendedShards.js diff --git a/docs/docs.json b/docs/docs.json index fcebb6f9e..732837f18 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476231958722},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":223,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":232,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":252,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":267,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":277,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":287,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":299,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":121,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":139,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":145,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":160,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":169,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":178,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":187,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":200,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":400,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":406,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"spawnArgs=","description":"Optional command line arguments to pass to the shard","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":52,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":70,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":98,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"The options for the sharding manager.","type":{"types":[[["Object",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":71,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":124,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":135,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":150,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":51,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#spawnArgs","name":"spawnArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["array",""]]]},"meta":{"line":57,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":74,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.array()[0];\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolveable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolveable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolveable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476415444066},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"spawnArgs","description":"Command line arguments to pass to the shard","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nIf you do not select an amount of shards, the manager will automatically decide the best amount.\nThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"The options for the sharding manager.","type":{"types":[[["Object",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":99,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":152,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":163,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":178,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":49,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":55,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#spawnArgs","name":"spawnArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":61,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token that will be passed to the shards. Also used for auto shard count.","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":67,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":73,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":84,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.array()[0];\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file diff --git a/src/client/Client.js b/src/client/Client.js index b2ed42f1e..652c11f16 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -114,11 +114,15 @@ class Client extends EventEmitter { */ this.presences = new Collection(); - /** - * The authorization token for the logged in user/bot. - * @type {?string} - */ - this.token = null; + if (!this.token && 'CLIENT_TOKEN' in process.env) { + /** + * The authorization token for the logged in user/bot. + * @type {?string} + */ + this.token = process.env.CLIENT_TOKEN; + } else { + this.token = null; + } /** * The email, if there is one, for the logged in Client diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index fed7ab7fd..8cbd40b2b 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -14,7 +14,7 @@ class RESTMethods { this.rest = restManager; } - loginToken(token) { + loginToken(token = this.rest.client.token) { token = token.replace('Bot ', ''); return new Promise((resolve, reject) => { this.rest.client.manager.connectToWebSocket(token, resolve, reject); @@ -49,6 +49,10 @@ class RESTMethods { }); } + getBotGateway() { + return this.rest.makeRequest('get', Constants.Endpoints.botGateway, true); + } + sendMessage(channel, content, { tts, nonce, disableEveryone, split } = {}, file = null) { return new Promise((resolve, reject) => { if (typeof content !== 'undefined') content = this.rest.client.resolver.resolveString(content); diff --git a/src/index.js b/src/index.js index 24b5a26da..cd2d86ba4 100644 --- a/src/index.js +++ b/src/index.js @@ -8,6 +8,7 @@ module.exports = { Collection: require('./util/Collection'), splitMessage: require('./util/SplitMessage'), escapeMarkdown: require('./util/EscapeMarkdown'), + getRecommendedShards: require('./util/GetRecommendedShards'), Channel: require('./structures/Channel'), ClientUser: require('./structures/ClientUser'), diff --git a/src/sharding/Shard.js b/src/sharding/Shard.js index 647a0a2cf..5f7eb2e4b 100644 --- a/src/sharding/Shard.js +++ b/src/sharding/Shard.js @@ -10,7 +10,7 @@ class Shard { /** * @param {ShardingManager} manager The sharding manager * @param {number} id The ID of this shard - * @param {array} [spawnArgs=] Optional command line arguments to pass to the shard + * @param {array} [spawnArgs=[]] Command line arguments to pass to the shard */ constructor(manager, id, spawnArgs = []) { /** @@ -25,15 +25,22 @@ class Shard { */ this.id = id; + /** + * The environment variables for the shard + * @type {Object} + */ + this.env = { + SHARD_ID: this.id, + SHARD_COUNT: this.manager.totalShards, + }; + if (this.manager.token) this.env.CLIENT_TOKEN = this.manager.token; + /** * Process of the shard * @type {ChildProcess} */ this.process = childProcess.fork(path.resolve(this.manager.file), spawnArgs, { - env: { - SHARD_ID: this.id, - SHARD_COUNT: this.manager.totalShards, - }, + env: this.env, }); this.process.on('message', this._handleMessage.bind(this)); this.process.once('exit', () => { diff --git a/src/sharding/ShardingManager.js b/src/sharding/ShardingManager.js index 6272709c2..f0829c6df 100644 --- a/src/sharding/ShardingManager.js +++ b/src/sharding/ShardingManager.js @@ -4,10 +4,12 @@ const EventEmitter = require('events').EventEmitter; const mergeDefault = require('../util/MergeDefault'); const Shard = require('./Shard'); const Collection = require('../util/Collection'); +const getRecommendedShards = require('../util/GetRecommendedShards'); /** * This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate * from the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely. + * If you do not select an amount of shards, the manager will automatically decide the best amount. * The Sharding Manager is still experimental * @extends {EventEmitter} */ @@ -18,8 +20,7 @@ class ShardingManager extends EventEmitter { */ constructor(file, options = {}) { super(); - - options = mergeDefault({ totalShards: 1, respawn: true, spawnArgs: [] }, options); + options = mergeDefault({ totalShards: 'auto', respawn: true, spawnArgs: [], token: null }, options); /** * Path to the shard script file @@ -31,17 +32,20 @@ class ShardingManager extends EventEmitter { const stats = fs.statSync(this.file); if (!stats.isFile()) throw new Error('File path does not point to a file.'); + if (options.totalShards !== 'auto') { + if (typeof options.totalShards !== 'number' || isNaN(options.totalShards)) { + throw new TypeError('Amount of shards must be a number.'); + } + if (options.totalShards < 1) throw new RangeError('Amount of shards must be at least 1.'); + if (options.totalShards !== Math.floor(options.totalShards)) { + throw new RangeError('Amount of shards must be an integer.'); + } + } + /** * Amount of shards that this manager is going to spawn - * @type {number} + * @type {number|string} */ - if (typeof options.totalShards !== 'number' || isNaN(options.totalShards)) { - throw new TypeError('Amount of shards must be a number.'); - } - if (options.totalShards < 1) throw new RangeError('Amount of shards must be at least 1.'); - if (options.totalShards !== Math.floor(options.totalShards)) { - throw new RangeError('Amount of shards must be an integer.'); - } this.totalShards = options.totalShards; /** @@ -52,10 +56,16 @@ class ShardingManager extends EventEmitter { /** * An array of arguments to pass to shards. - * @type {array} + * @type {string[]} */ this.spawnArgs = options.spawnArgs; + /** + * Token that will be passed to the shards. Also used for auto shard count. + * @type {string} + */ + this.token = options.token || null; + /** * A collection of shards that this manager has spawned * @type {Collection} @@ -87,10 +97,28 @@ class ShardingManager extends EventEmitter { * @returns {Promise>} */ spawn(amount = this.totalShards, delay = 5500) { - if (typeof amount !== 'number' || isNaN(amount)) throw new TypeError('Amount of shards must be a number.'); - if (amount < 1) throw new RangeError('Amount of shards must be at least 1.'); - if (amount !== Math.floor(amount)) throw new RangeError('Amount of shards must be an integer.'); + return new Promise((resolve, reject) => { + if (amount === 'auto') { + getRecommendedShards(this.token).then(count => { + resolve(this._spawn(count, delay)); + }).catch(reject); + } else { + if (typeof amount !== 'number' || isNaN(amount)) throw new TypeError('Amount of shards must be a number.'); + if (amount < 1) throw new RangeError('Amount of shards must be at least 1.'); + if (amount !== Math.floor(amount)) throw new TypeError('Amount of shards must be an integer.'); + resolve(this._spawn(amount, delay)); + } + }); + } + /** + * Actually spawns shards, unlike that poser above >:( + * @param {number} amount Number of shards to spawn + * @param {number} delay How long to wait in between spawning each shard (in milliseconds) + * @returns {Promise>} + * @private + */ + _spawn(amount, delay) { return new Promise(resolve => { if (this.shards.size >= amount) throw new Error(`Already spawned ${this.shards.size} shards.`); this.totalShards = amount; diff --git a/src/util/Constants.js b/src/util/Constants.js index 91486f935..e6a33d7d1 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -72,6 +72,7 @@ const Endpoints = exports.Endpoints = { login: `${API}/auth/login`, logout: `${API}/auth/logout`, gateway: `${API}/gateway`, + botGateway: `${API}/gateway/bot`, invite: (id) => `${API}/invite/${id}`, inviteLink: (id) => `https://discord.gg/${id}`, CDN: 'https://cdn.discordapp.com', diff --git a/src/util/GetRecommendedShards.js b/src/util/GetRecommendedShards.js new file mode 100644 index 000000000..efd8f8be1 --- /dev/null +++ b/src/util/GetRecommendedShards.js @@ -0,0 +1,19 @@ +const superagent = require('superagent'); +const botGateway = require('./Constants').Endpoints.botGateway; + +/** + * Gets the recommended shard count from Discord + * @param {number} token Discord auth token + * @returns {Promise} the recommended number of shards + */ +module.exports = function getRecommendedShards(token) { + return new Promise((resolve, reject) => { + if (!token) reject(new Error('A token must be provided.')); + superagent.get(botGateway) + .set('Authorization', `Bot ${token.replace('Bot ', '')}`) + .end((err, res) => { + if (err) reject(err); + resolve(res.body.shards); + }); + }); +}; From aad06c1116cd78b79331d67bb11b9938a9678e33 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Thu, 13 Oct 2016 23:32:52 -0400 Subject: [PATCH 097/188] Teensy cleanup --- docs/docs.json | 2 +- src/sharding/ShardingManager.js | 4 ++-- src/util/GetRecommendedShards.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 732837f18..960e0e7c8 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476415444066},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"spawnArgs","description":"Command line arguments to pass to the shard","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nIf you do not select an amount of shards, the manager will automatically decide the best amount.\nThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"The options for the sharding manager.","type":{"types":[[["Object",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":99,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":152,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":163,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":178,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":49,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":55,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#spawnArgs","name":"spawnArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":61,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token that will be passed to the shards. Also used for auto shard count.","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":67,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":73,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":84,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.array()[0];\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476415966921},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"spawnArgs","description":"Command line arguments to pass to the shard","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"The options for the sharding manager.","type":{"types":[[["Object",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":99,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":152,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":163,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":178,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":49,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":55,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#spawnArgs","name":"spawnArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":61,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":67,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":73,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":84,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/sharding/ShardingManager.js b/src/sharding/ShardingManager.js index f0829c6df..45d67df76 100644 --- a/src/sharding/ShardingManager.js +++ b/src/sharding/ShardingManager.js @@ -61,10 +61,10 @@ class ShardingManager extends EventEmitter { this.spawnArgs = options.spawnArgs; /** - * Token that will be passed to the shards. Also used for auto shard count. + * Token to use for obtaining the automatic shard count, and passing to shards * @type {string} */ - this.token = options.token || null; + this.token = options.token; /** * A collection of shards that this manager has spawned diff --git a/src/util/GetRecommendedShards.js b/src/util/GetRecommendedShards.js index efd8f8be1..050740218 100644 --- a/src/util/GetRecommendedShards.js +++ b/src/util/GetRecommendedShards.js @@ -8,7 +8,7 @@ const botGateway = require('./Constants').Endpoints.botGateway; */ module.exports = function getRecommendedShards(token) { return new Promise((resolve, reject) => { - if (!token) reject(new Error('A token must be provided.')); + if (!token) throw new Error('A token must be provided.'); superagent.get(botGateway) .set('Authorization', `Bot ${token.replace('Bot ', '')}`) .end((err, res) => { From 3293f9a8de0237d5c132e51345585f057cdf14a6 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Thu, 13 Oct 2016 23:58:32 -0400 Subject: [PATCH 098/188] Add automatic shard spawning, and document options --- docs/docs.json | 2 +- src/sharding/ShardingManager.js | 56 +++++++++++++++++++++++++-------- 2 files changed, 44 insertions(+), 14 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 960e0e7c8..5bc47fc3a 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476415966921},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"spawnArgs","description":"Command line arguments to pass to the shard","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"The options for the sharding manager.","type":{"types":[[["Object",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":99,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":152,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":163,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":178,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":49,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":55,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#spawnArgs","name":"spawnArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":61,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":67,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":73,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":84,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476417495126},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"spawnArgs","description":"Command line arguments to pass to the shard","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.autoShardInterval","description":"How frequently to automatically spawn another shard if needed\r(in seconds) - only applicable if `totalShards` is `auto`","optional":true,"type":{"types":[[["number",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.spawnArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":111,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":129,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":182,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":193,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":208,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":51,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#autoShardInterval","name":"autoShardInterval","description":"How frequently to check the recommend shard count and spawn a new shard if necessary (in seconds).\rOnly applicable when `totalShards` is `auto`.","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":67,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#spawnArgs","name":"spawnArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":82,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":88,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":94,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":114,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/sharding/ShardingManager.js b/src/sharding/ShardingManager.js index 45d67df76..8ff1fc83c 100644 --- a/src/sharding/ShardingManager.js +++ b/src/sharding/ShardingManager.js @@ -16,11 +16,23 @@ const getRecommendedShards = require('../util/GetRecommendedShards'); class ShardingManager extends EventEmitter { /** * @param {string} file Path to your shard script file - * @param {Object} options The options for the sharding manager. + * @param {Object} [options] Options for the sharding manager + * @param {number|string} [options.totalShards='auto'] Number of shards to spawn, or "auto" + * @param {number} [options.autoShardInterval=600] How frequently to automatically spawn another shard if needed + * (in seconds) - only applicable if `totalShards` is `auto` + * @param {boolean} [options.respawn=true] Whether shards should automatically respawn upon exiting + * @param {string[]} [options.spawnArgs=[]] Arguments to pass to the shard script when spawning + * @param {string} [options.token] Token to use for automatic shard count and passing to shards */ constructor(file, options = {}) { super(); - options = mergeDefault({ totalShards: 'auto', respawn: true, spawnArgs: [], token: null }, options); + options = mergeDefault({ + totalShards: 'auto', + autoShardInterval: 600, + respawn: true, + spawnArgs: [], + token: null, + }, options); /** * Path to the shard script file @@ -32,21 +44,30 @@ class ShardingManager extends EventEmitter { const stats = fs.statSync(this.file); if (!stats.isFile()) throw new Error('File path does not point to a file.'); - if (options.totalShards !== 'auto') { - if (typeof options.totalShards !== 'number' || isNaN(options.totalShards)) { - throw new TypeError('Amount of shards must be a number.'); - } - if (options.totalShards < 1) throw new RangeError('Amount of shards must be at least 1.'); - if (options.totalShards !== Math.floor(options.totalShards)) { - throw new RangeError('Amount of shards must be an integer.'); - } - } - /** * Amount of shards that this manager is going to spawn * @type {number|string} */ this.totalShards = options.totalShards; + if (this.totalShards !== 'auto') { + if (typeof this.totalShards !== 'number' || isNaN(this.totalShards)) { + throw new TypeError('Amount of shards must be a number.'); + } + if (this.totalShards < 1) throw new RangeError('Amount of shards must be at least 1.'); + if (this.totalShards !== Math.floor(this.totalShards)) { + throw new RangeError('Amount of shards must be an integer.'); + } + } + + /** + * How frequently to check the recommend shard count and spawn a new shard if necessary (in seconds). + * Only applicable when `totalShards` is `auto`. + * @type {number} + */ + this.autoShardInterval = options.autoShardInterval; + if (typeof this.autoShardInterval !== 'number' || isNaN(this.autoShardInterval)) { + throw new TypeError('The autoShardInterval option must be a number.'); + } /** * Whether shards should automatically respawn upon exiting @@ -62,7 +83,7 @@ class ShardingManager extends EventEmitter { /** * Token to use for obtaining the automatic shard count, and passing to shards - * @type {string} + * @type {?string} */ this.token = options.token; @@ -71,6 +92,15 @@ class ShardingManager extends EventEmitter { * @type {Collection} */ this.shards = new Collection(); + + // Set up automatic shard creation interval + if (this.totalShards === 'auto' && this.autoShardInterval > 0) { + setInterval(() => { + getRecommendedShards(this.token).then(count => { + if (this.shards.size < count) this.createShard(); + }); + }, this.autoShardInterval); + } } /** From 915a4cbe37ac09cc311a9fc4c06d4ecd99061e32 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Fri, 14 Oct 2016 00:00:15 -0400 Subject: [PATCH 099/188] Rename spawnArgs -> shardArgs --- docs/docs.json | 2 +- src/sharding/Shard.js | 6 +++--- src/sharding/ShardingManager.js | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 5bc47fc3a..3da4e8714 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476417495126},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"spawnArgs","description":"Command line arguments to pass to the shard","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.autoShardInterval","description":"How frequently to automatically spawn another shard if needed\r(in seconds) - only applicable if `totalShards` is `auto`","optional":true,"type":{"types":[[["number",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.spawnArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":111,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":129,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":182,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":193,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":208,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":51,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#autoShardInterval","name":"autoShardInterval","description":"How frequently to check the recommend shard count and spawn a new shard if necessary (in seconds).\rOnly applicable when `totalShards` is `auto`.","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":67,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#spawnArgs","name":"spawnArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":82,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":88,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":94,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":114,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476417601385},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.autoShardInterval","description":"How frequently to automatically spawn another shard if needed\r(in seconds) - only applicable if `totalShards` is `auto`","optional":true,"type":{"types":[[["number",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":111,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":129,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":182,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":193,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":208,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":51,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#autoShardInterval","name":"autoShardInterval","description":"How frequently to check the recommend shard count and spawn a new shard if necessary (in seconds).\rOnly applicable when `totalShards` is `auto`.","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":67,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":82,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":88,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":94,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":114,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/sharding/Shard.js b/src/sharding/Shard.js index 5f7eb2e4b..364861b7f 100644 --- a/src/sharding/Shard.js +++ b/src/sharding/Shard.js @@ -10,9 +10,9 @@ class Shard { /** * @param {ShardingManager} manager The sharding manager * @param {number} id The ID of this shard - * @param {array} [spawnArgs=[]] Command line arguments to pass to the shard + * @param {array} [args=[]] Command line arguments to pass to the script */ - constructor(manager, id, spawnArgs = []) { + constructor(manager, id, args = []) { /** * Manager that created the shard * @type {ShardingManager} @@ -39,7 +39,7 @@ class Shard { * Process of the shard * @type {ChildProcess} */ - this.process = childProcess.fork(path.resolve(this.manager.file), spawnArgs, { + this.process = childProcess.fork(path.resolve(this.manager.file), args, { env: this.env, }); this.process.on('message', this._handleMessage.bind(this)); diff --git a/src/sharding/ShardingManager.js b/src/sharding/ShardingManager.js index 8ff1fc83c..dd4e4e529 100644 --- a/src/sharding/ShardingManager.js +++ b/src/sharding/ShardingManager.js @@ -21,7 +21,7 @@ class ShardingManager extends EventEmitter { * @param {number} [options.autoShardInterval=600] How frequently to automatically spawn another shard if needed * (in seconds) - only applicable if `totalShards` is `auto` * @param {boolean} [options.respawn=true] Whether shards should automatically respawn upon exiting - * @param {string[]} [options.spawnArgs=[]] Arguments to pass to the shard script when spawning + * @param {string[]} [options.shardArgs=[]] Arguments to pass to the shard script when spawning * @param {string} [options.token] Token to use for automatic shard count and passing to shards */ constructor(file, options = {}) { @@ -30,7 +30,7 @@ class ShardingManager extends EventEmitter { totalShards: 'auto', autoShardInterval: 600, respawn: true, - spawnArgs: [], + shardArgs: [], token: null, }, options); @@ -79,7 +79,7 @@ class ShardingManager extends EventEmitter { * An array of arguments to pass to shards. * @type {string[]} */ - this.spawnArgs = options.spawnArgs; + this.shardArgs = options.shardArgs; /** * Token to use for obtaining the automatic shard count, and passing to shards @@ -109,7 +109,7 @@ class ShardingManager extends EventEmitter { * @returns {Promise} */ createShard(id = this.shards.size) { - const shard = new Shard(this, id, this.spawnArgs); + const shard = new Shard(this, id, this.shardArgs); this.shards.set(id, shard); /** * Emitted upon launching a shard From 485ffd267e40d7c9128f25f952c1e150decc63e2 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Fri, 14 Oct 2016 00:21:08 -0400 Subject: [PATCH 100/188] Remove auto shard spawn interval (Discord doesn't support such a great idea :eyes:) --- docs/docs.json | 2 +- src/sharding/ShardingManager.js | 22 ---------------------- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 3da4e8714..730eb3151 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476417601385},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.autoShardInterval","description":"How frequently to automatically spawn another shard if needed\r(in seconds) - only applicable if `totalShards` is `auto`","optional":true,"type":{"types":[[["number",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":111,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":129,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":182,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":193,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":208,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":51,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#autoShardInterval","name":"autoShardInterval","description":"How frequently to check the recommend shard count and spawn a new shard if necessary (in seconds).\rOnly applicable when `totalShards` is `auto`.","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":67,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":82,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":88,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":94,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":114,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476418835564},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/sharding/ShardingManager.js b/src/sharding/ShardingManager.js index dd4e4e529..2d770472d 100644 --- a/src/sharding/ShardingManager.js +++ b/src/sharding/ShardingManager.js @@ -18,8 +18,6 @@ class ShardingManager extends EventEmitter { * @param {string} file Path to your shard script file * @param {Object} [options] Options for the sharding manager * @param {number|string} [options.totalShards='auto'] Number of shards to spawn, or "auto" - * @param {number} [options.autoShardInterval=600] How frequently to automatically spawn another shard if needed - * (in seconds) - only applicable if `totalShards` is `auto` * @param {boolean} [options.respawn=true] Whether shards should automatically respawn upon exiting * @param {string[]} [options.shardArgs=[]] Arguments to pass to the shard script when spawning * @param {string} [options.token] Token to use for automatic shard count and passing to shards @@ -28,7 +26,6 @@ class ShardingManager extends EventEmitter { super(); options = mergeDefault({ totalShards: 'auto', - autoShardInterval: 600, respawn: true, shardArgs: [], token: null, @@ -59,16 +56,6 @@ class ShardingManager extends EventEmitter { } } - /** - * How frequently to check the recommend shard count and spawn a new shard if necessary (in seconds). - * Only applicable when `totalShards` is `auto`. - * @type {number} - */ - this.autoShardInterval = options.autoShardInterval; - if (typeof this.autoShardInterval !== 'number' || isNaN(this.autoShardInterval)) { - throw new TypeError('The autoShardInterval option must be a number.'); - } - /** * Whether shards should automatically respawn upon exiting * @type {boolean} @@ -92,15 +79,6 @@ class ShardingManager extends EventEmitter { * @type {Collection} */ this.shards = new Collection(); - - // Set up automatic shard creation interval - if (this.totalShards === 'auto' && this.autoShardInterval > 0) { - setInterval(() => { - getRecommendedShards(this.token).then(count => { - if (this.shards.size < count) this.createShard(); - }); - }, this.autoShardInterval); - } } /** From 1ef00d0fe77f8c2bdce55b25beab182e247bd273 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Fri, 14 Oct 2016 00:52:25 -0400 Subject: [PATCH 101/188] Change node-opus and opusscript to peer deps --- README.md | 12 +++++++----- docs/custom/documents/welcome.md | 12 +++++++----- package.json | 8 ++++---- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 1a3e4472d..c5f336cba 100644 --- a/README.md +++ b/README.md @@ -16,12 +16,14 @@ discord.js is a powerful node.js module that allows you to interact with the [Di ## Installation **Node.js 6.0.0 or newer is required.** -With voice support: `npm install --save discord.js --production` -Without voice support: `npm install --save discord.js --production --no-optional` +Without voice support: `npm install discord.js --save --production` +With voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` +With voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` +If both audio packages are installed, discord.js will automatically choose node-opus. -By default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections. -If you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus). -discord.js will automatically prefer node-opus over opusscript. +The preferred audio engine is node-opus, as it performs significantly better than opusscript. +Using opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge. +For production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers. ## Example Usage ```js diff --git a/docs/custom/documents/welcome.md b/docs/custom/documents/welcome.md index 74483b166..f51e3c512 100644 --- a/docs/custom/documents/welcome.md +++ b/docs/custom/documents/welcome.md @@ -20,12 +20,14 @@ stable and performant than previous versions. ## Installation **Node.js 6.0.0 or newer is required.** -With voice support: `npm install --save discord.js --production` -Without voice support: `npm install --save discord.js --production --no-optional` +Without voice support: `npm install discord.js --save --production` +With voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` +With voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` +If both audio packages are installed, discord.js will automatically prefer node-opus. -By default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections. -If you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus). -discord.js will automatically prefer node-opus over opusscript. +The preferred audio engine is node-opus, as it performs significantly better than opusscript. +Using opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge. +For production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers. ## Guides * [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/) diff --git a/package.json b/package.json index 9d5e24950..3fb7ed856 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,10 @@ "dependencies": { "superagent": "^2.2.0", "tweetnacl": "^0.14.3", - "ws": "^1.1.1", + "ws": "^1.1.1" + }, + "peerDependencies": { + "node-opus": "^0.2.1", "opusscript": "^0.0.1" }, "devDependencies": { @@ -36,9 +39,6 @@ "jsdoc-parse": "^1.2.0", "eslint": "^3.4.0" }, - "optionalDependencies": { - "node-opus": "^0.2.1" - }, "engines": { "node": ">=6.0.0" } From ca4e9549a0be09077069d2db6beb0d5c641c3674 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Fri, 14 Oct 2016 01:13:50 -0400 Subject: [PATCH 102/188] Add link to Yeoman generator --- README.md | 2 ++ docs/docs.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c5f336cba..032245e0b 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,8 @@ client.on('message', message => { client.login('your token'); ``` +A bot template using discord.js can be generated using [generator-discordbot](https://www.npmjs.com/package/generator-discordbot). + ## Links * [Website](http://hydrabolt.github.io/discord.js/) * [Discord.js Server](https://discord.gg/bRCvFy9) diff --git a/docs/docs.json b/docs/docs.json index 730eb3151..9e8c638bf 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476418835564},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476422023473},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file From 84bca168b657696feb14b6f29004fc7f992d2222 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Fri, 14 Oct 2016 01:26:54 -0400 Subject: [PATCH 103/188] Update docs --- CONTRIBUTING.md | 8 ++++---- README.md | 21 +++++++++++++-------- docs/custom/documents/welcome.md | 10 +++++----- docs/docs.json | 2 +- 4 files changed, 23 insertions(+), 18 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4afe7392a..4d1c83166 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,8 +7,8 @@ is a great boon to your coding process. To get ready to work on the codebase, please do the following: 1. Fork & clone the repository -2. Run `npm install`, or `npm install --no-optional` if you're not working on voice -3. Code your heart out! -4. Run `npm test` to run ESLint -5. Run `npm run docs` to build any documentation changes +2. Run `npm install` +3. If you're working on voice, also run `npm install node-opus` or `npm install opusscript` +4. Code your heart out! +5. Run `npm test` to run ESLint and ensure any JSDoc changes are valid 6. [Submit a pull request](https://github.com/hydrabolt/discord.js/compare) diff --git a/README.md b/README.md index 032245e0b..61920075e 100644 --- a/README.md +++ b/README.md @@ -47,15 +47,20 @@ A bot template using discord.js can be generated using [generator-discordbot](ht ## Links * [Website](http://hydrabolt.github.io/discord.js/) -* [Discord.js Server](https://discord.gg/bRCvFy9) -* [Discord API Server](https://discord.gg/rV4BwdK) +* [Discord.js server](https://discord.gg/bRCvFy9) +* [Discord API server](https://discord.gg/rV4BwdK) * [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master) -* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html) +* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html) +* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples) * [GitHub](https://github.com/hydrabolt/discord.js) * [NPM](https://www.npmjs.com/package/discord.js) -* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples) -* [Related Libraries](https://discordapi.com/unofficial/libs.html) +* [Related libraries](https://discordapi.com/unofficial/libs.html) -## Contact -Before reporting an issue, please read the [documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master). -If you can't find help there, you can ask in the official [Discord.js Server](https://discord.gg/bRCvFy9). +## Contributing +Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the +[documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master). +See [the contributing guide](CONTRIBUTING.md) if you'd like to submit a PR. + +## Help +If you don't understand something in this documentation, you are experiencing problems, or you just need a gentle +nudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9). diff --git a/docs/custom/documents/welcome.md b/docs/custom/documents/welcome.md index f51e3c512..bd3251f37 100644 --- a/docs/custom/documents/welcome.md +++ b/docs/custom/documents/welcome.md @@ -35,14 +35,14 @@ For production bots, using node-opus should be considered a necessity, especiall ## Links * [Website](http://hydrabolt.github.io/discord.js/) -* [Discord.js Server](https://discord.gg/bRCvFy9) -* [Discord API Server](https://discord.gg/rV4BwdK) +* [Discord.js server](https://discord.gg/bRCvFy9) +* [Discord API server](https://discord.gg/rV4BwdK) * [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master) -* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html) +* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html) +* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples) * [GitHub](https://github.com/hydrabolt/discord.js) * [NPM](https://www.npmjs.com/package/discord.js) -* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples) -* [Related Libraries](https://discordapi.com/unofficial/libs.html) +* [Related libraries](https://discordapi.com/unofficial/libs.html) ## Help If you don't understand something in this documentation, you are experiencing problems, or you just need a gentle diff --git a/docs/docs.json b/docs/docs.json index 9e8c638bf..623f70bc4 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476422023473},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476422807764},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file From a6ca05b379f19e1832cd2ddd3065393b7b7a8934 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Fri, 14 Oct 2016 01:27:54 -0400 Subject: [PATCH 104/188] Change a word in help --- README.md | 2 +- docs/custom/documents/welcome.md | 2 +- docs/docs.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 61920075e..d8154b7be 100644 --- a/README.md +++ b/README.md @@ -62,5 +62,5 @@ Before creating an issue, please ensure that it hasn't already been reported/sug See [the contributing guide](CONTRIBUTING.md) if you'd like to submit a PR. ## Help -If you don't understand something in this documentation, you are experiencing problems, or you just need a gentle +If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9). diff --git a/docs/custom/documents/welcome.md b/docs/custom/documents/welcome.md index bd3251f37..36c57d6cc 100644 --- a/docs/custom/documents/welcome.md +++ b/docs/custom/documents/welcome.md @@ -45,5 +45,5 @@ For production bots, using node-opus should be considered a necessity, especiall * [Related libraries](https://discordapi.com/unofficial/libs.html) ## Help -If you don't understand something in this documentation, you are experiencing problems, or you just need a gentle +If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9). diff --git a/docs/docs.json b/docs/docs.json index 623f70bc4..fea3ae05c 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476422807764},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476422865654},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file From 6e76df26568bb4b4d982b3d059ab3d79ded6c639 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Fri, 14 Oct 2016 01:45:02 -0400 Subject: [PATCH 105/188] Update legacy docs link --- README.md | 2 +- docs/custom/documents/welcome.md | 2 +- docs/docs.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d8154b7be..20c73fb01 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ A bot template using discord.js can be generated using [generator-discordbot](ht * [Discord.js server](https://discord.gg/bRCvFy9) * [Discord API server](https://discord.gg/rV4BwdK) * [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master) -* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html) +* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html) * [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples) * [GitHub](https://github.com/hydrabolt/discord.js) * [NPM](https://www.npmjs.com/package/discord.js) diff --git a/docs/custom/documents/welcome.md b/docs/custom/documents/welcome.md index 36c57d6cc..dccf80bbd 100644 --- a/docs/custom/documents/welcome.md +++ b/docs/custom/documents/welcome.md @@ -38,7 +38,7 @@ For production bots, using node-opus should be considered a necessity, especiall * [Discord.js server](https://discord.gg/bRCvFy9) * [Discord API server](https://discord.gg/rV4BwdK) * [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master) -* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html) +* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html) * [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples) * [GitHub](https://github.com/hydrabolt/discord.js) * [NPM](https://www.npmjs.com/package/discord.js) diff --git a/docs/docs.json b/docs/docs.json index fea3ae05c..9cda5e5d3 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476422865654},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476423882221},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file From e4636243b222166d27e2c5d361f1821d2a6ea143 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Fri, 14 Oct 2016 02:11:31 -0400 Subject: [PATCH 106/188] Improve token "Bot" removal --- src/client/rest/RESTMethods.js | 2 +- src/sharding/ShardingManager.js | 2 +- src/util/GetRecommendedShards.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 8cbd40b2b..85c4c698d 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -15,7 +15,7 @@ class RESTMethods { } loginToken(token = this.rest.client.token) { - token = token.replace('Bot ', ''); + token = token.replace(/^Bot /, ''); return new Promise((resolve, reject) => { this.rest.client.manager.connectToWebSocket(token, resolve, reject); }); diff --git a/src/sharding/ShardingManager.js b/src/sharding/ShardingManager.js index 2d770472d..640822455 100644 --- a/src/sharding/ShardingManager.js +++ b/src/sharding/ShardingManager.js @@ -72,7 +72,7 @@ class ShardingManager extends EventEmitter { * Token to use for obtaining the automatic shard count, and passing to shards * @type {?string} */ - this.token = options.token; + this.token = options.token ? options.token.replace(/^Bot /, '') : null; /** * A collection of shards that this manager has spawned diff --git a/src/util/GetRecommendedShards.js b/src/util/GetRecommendedShards.js index 050740218..abce3fb39 100644 --- a/src/util/GetRecommendedShards.js +++ b/src/util/GetRecommendedShards.js @@ -10,7 +10,7 @@ module.exports = function getRecommendedShards(token) { return new Promise((resolve, reject) => { if (!token) throw new Error('A token must be provided.'); superagent.get(botGateway) - .set('Authorization', `Bot ${token.replace('Bot ', '')}`) + .set('Authorization', `Bot ${token.replace(/^Bot /, '')}`) .end((err, res) => { if (err) reject(err); resolve(res.body.shards); From 8f0e2e0c56c9ab2c7c93d0aa1039dfceaa93dad2 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Fri, 14 Oct 2016 02:14:00 -0400 Subject: [PATCH 107/188] Make token "Bot" removal more lenient In case of heavy user error. :) --- src/client/rest/RESTMethods.js | 2 +- src/sharding/ShardingManager.js | 2 +- src/util/GetRecommendedShards.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 85c4c698d..3bbe155dd 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -15,7 +15,7 @@ class RESTMethods { } loginToken(token = this.rest.client.token) { - token = token.replace(/^Bot /, ''); + token = token.replace(/^Bot\s*/i, ''); return new Promise((resolve, reject) => { this.rest.client.manager.connectToWebSocket(token, resolve, reject); }); diff --git a/src/sharding/ShardingManager.js b/src/sharding/ShardingManager.js index 640822455..911fa47b7 100644 --- a/src/sharding/ShardingManager.js +++ b/src/sharding/ShardingManager.js @@ -72,7 +72,7 @@ class ShardingManager extends EventEmitter { * Token to use for obtaining the automatic shard count, and passing to shards * @type {?string} */ - this.token = options.token ? options.token.replace(/^Bot /, '') : null; + this.token = options.token ? options.token.replace(/^Bot\s*/i, '') : null; /** * A collection of shards that this manager has spawned diff --git a/src/util/GetRecommendedShards.js b/src/util/GetRecommendedShards.js index abce3fb39..8165cd02f 100644 --- a/src/util/GetRecommendedShards.js +++ b/src/util/GetRecommendedShards.js @@ -10,7 +10,7 @@ module.exports = function getRecommendedShards(token) { return new Promise((resolve, reject) => { if (!token) throw new Error('A token must be provided.'); superagent.get(botGateway) - .set('Authorization', `Bot ${token.replace(/^Bot /, '')}`) + .set('Authorization', `Bot ${token.replace(/^Bot\s*/i, '')}`) .end((err, res) => { if (err) reject(err); resolve(res.body.shards); From 50a1d1cbef021eca01cdc5c180a4f34360354c54 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Fri, 14 Oct 2016 17:58:48 -0500 Subject: [PATCH 108/188] Add VoiceChannel.joinable/speakable (#802) * add some getters to voice channels * Update VoiceChannel.js * Update VoiceChannel.js * Update VoiceChannel.js --- docs/docs.json | 2 +- src/structures/VoiceChannel.js | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 9cda5e5d3..b38e9c5a4 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476423882221},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476485253510},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nIf you do not select an amount of shards, the manager will automatically decide the best amount.\nThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.array()[0];\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":90,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":98,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file diff --git a/src/structures/VoiceChannel.js b/src/structures/VoiceChannel.js index 3fd6b8090..2bc565d8b 100644 --- a/src/structures/VoiceChannel.js +++ b/src/structures/VoiceChannel.js @@ -45,6 +45,22 @@ class VoiceChannel extends GuildChannel { return null; } + /** + * Checks if the client has permission join the voice channel + * @type {boolean} + */ + get joinable() { + return this.permissionsFor(this.client.user).hasPermission('CONNECT'); + } + + /** + * Checks if the client has permission to send audio to the voice channel + * @type {boolean} + */ + get speakable() { + return this.permissionsFor(this.client.user).hasPermission('SPEAK'); + } + /** * Sets the bitrate of the channel * @param {number} bitrate The new bitrate From fe2192d544939c1785cd3e2f361136beab78a56c Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sat, 15 Oct 2016 00:12:37 -0400 Subject: [PATCH 109/188] Thanks for overriding the MessageOptions typedef, Gus :unamused: --- docs/docs.json | 2 +- src/structures/Webhook.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index b38e9c5a4..e9f1505f3 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476485253510},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nIf you do not select an amount of shards, the manager will automatically decide the best amount.\nThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.array()[0];\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":90,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":98,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476504733906},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":74,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":87,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":97,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"WebhookMessageOptions","name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/structures/Webhook.js b/src/structures/Webhook.js index 0e94e8ff6..4517eb8bd 100644 --- a/src/structures/Webhook.js +++ b/src/structures/Webhook.js @@ -67,7 +67,7 @@ class Webhook { /** * Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode - * @typedef {Object} MessageOptions + * @typedef {Object} WebhookMessageOptions * @property {boolean} [tts=false] Whether or not the message should be spoken aloud * @property {boolean} [disableEveryone=this.options.disableEveryone] Whether or not @everyone and @here * should be replaced with plain-text @@ -76,7 +76,7 @@ class Webhook { /** * Send a message with this webhook * @param {StringResolvable} content The content to send. - * @param {MessageOptions} [options={}] The options to provide. + * @param {WebhookMessageOptions} [options={}] The options to provide. * @returns {Promise} * @example * // send a message @@ -112,7 +112,7 @@ class Webhook { /** * Send a text-to-speech message with this webhook * @param {StringResolvable} content The content to send - * @param {MessageOptions} [options={}] The options to provide + * @param {WebhookMessageOptions} [options={}] The options to provide * @returns {Promise} * @example * // send a TTS message @@ -130,7 +130,7 @@ class Webhook { * @param {FileResolvable} attachment The file to send * @param {string} [fileName="file.jpg"] The name and extension of the file * @param {StringResolvable} [content] Text message to send with the attachment - * @param {MessageOptions} [options] The options to provide + * @param {WebhookMessageOptions} [options] The options to provide * @returns {Promise} */ sendFile(attachment, fileName, content, options = {}) { @@ -157,7 +157,7 @@ class Webhook { * Send a code block with this webhook * @param {string} lang Language for the code block * @param {StringResolvable} content Content of the code block - * @param {MessageOptions} options The options to provide + * @param {WebhookMessageOptions} options The options to provide * @returns {Promise} */ sendCode(lang, content, options = {}) { From 6baf43dc24396b28a7017fa727266d574cf736e1 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sat, 15 Oct 2016 01:20:31 -0400 Subject: [PATCH 110/188] Add Collection.filterArray --- src/util/Collection.js | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/util/Collection.js b/src/util/Collection.js index b70cec32f..53299023a 100644 --- a/src/util/Collection.js +++ b/src/util/Collection.js @@ -205,11 +205,27 @@ class Collection extends Map { */ filter(fn, thisArg) { if (thisArg) fn = fn.bind(thisArg); - const collection = new Collection(); + const results = new Collection(); for (const [key, val] of this) { - if (fn(val, key, this)) collection.set(key, val); + if (fn(val, key, this)) results.set(key, val); } - return collection; + return results; + } + + /** + * Identical to + * [Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter). + * @param {function} fn Function used to test (should return a boolean) + * @param {Object} [thisArg] Value to use as `this` when executing function + * @returns {Collection} + */ + filterArray(fn, thisArg) { + if (thisArg) fn = fn.bind(thisArg); + const results = []; + for (const [key, val] of this) { + if (fn(val, key, this)) results.push(val); + } + return results; } /** From f2555132fee92b3e9716b98a5cea0440d13af149 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sat, 15 Oct 2016 01:29:46 -0400 Subject: [PATCH 111/188] Simplify sendCode lang --- src/structures/Message.js | 2 +- src/structures/Webhook.js | 2 +- src/structures/interface/TextBasedChannel.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/structures/Message.js b/src/structures/Message.js index 31afb2b1d..ca42645b6 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -334,7 +334,7 @@ class Message { */ editCode(lang, content) { content = escapeMarkdown(this.client.resolver.resolveString(content), true); - return this.edit(`\`\`\`${lang ? lang : ''}\n${content}\n\`\`\``); + return this.edit(`\`\`\`${lang || ''}\n${content}\n\`\`\``); } /** diff --git a/src/structures/Webhook.js b/src/structures/Webhook.js index 4517eb8bd..9367bc54e 100644 --- a/src/structures/Webhook.js +++ b/src/structures/Webhook.js @@ -167,7 +167,7 @@ class Webhook { if (!options.split.append) options.split.append = '\n```'; } content = escapeMarkdown(this.client.resolver.resolveString(content), true); - return this.sendMessage(`\`\`\`${lang ? lang : ''}\n${content}\n\`\`\``, options); + return this.sendMessage(`\`\`\`${lang || ''}\n${content}\n\`\`\``, options); } /** diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index a772d1590..bba561a74 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -116,7 +116,7 @@ class TextBasedChannel { if (!options.split.append) options.split.append = '\n```'; } content = escapeMarkdown(this.client.resolver.resolveString(content), true); - return this.sendMessage(`\`\`\`${lang ? lang : ''}\n${content}\n\`\`\``, options); + return this.sendMessage(`\`\`\`${lang || ''}\n${content}\n\`\`\``, options); } /** From 7e0f98ec68bed53fc745970a34d99d8671ea760d Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sat, 15 Oct 2016 01:45:13 -0400 Subject: [PATCH 112/188] MOAR SIMPLIFICATION --- src/structures/Webhook.js | 2 +- src/structures/interface/TextBasedChannel.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/structures/Webhook.js b/src/structures/Webhook.js index 9367bc54e..2661b896d 100644 --- a/src/structures/Webhook.js +++ b/src/structures/Webhook.js @@ -163,7 +163,7 @@ class Webhook { sendCode(lang, content, options = {}) { if (options.split) { if (typeof options.split !== 'object') options.split = {}; - if (!options.split.prepend) options.split.prepend = `\`\`\`${lang ? lang : ''}\n`; + if (!options.split.prepend) options.split.prepend = `\`\`\`${lang || ''}\n`; if (!options.split.append) options.split.append = '\n```'; } content = escapeMarkdown(this.client.resolver.resolveString(content), true); diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index bba561a74..72dcbacf3 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -112,7 +112,7 @@ class TextBasedChannel { sendCode(lang, content, options = {}) { if (options.split) { if (typeof options.split !== 'object') options.split = {}; - if (!options.split.prepend) options.split.prepend = `\`\`\`${lang ? lang : ''}\n`; + if (!options.split.prepend) options.split.prepend = `\`\`\`${lang || ''}\n`; if (!options.split.append) options.split.append = '\n```'; } content = escapeMarkdown(this.client.resolver.resolveString(content), true); From 0b5ef296cb475de52b24fb0d63e2446ce9c5e862 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sat, 15 Oct 2016 20:23:32 -0400 Subject: [PATCH 113/188] Fix split messages resolving with multiple of the same message --- src/client/rest/RESTMethods.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 3bbe155dd..e885ac50b 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -68,8 +68,7 @@ class RESTMethods { if (channel instanceof User || channel instanceof GuildMember) { this.createDM(channel).then(chan => { this._sendMessageRequest(chan, content, file, tts, nonce, resolve, reject); - }) - .catch(reject); + }).catch(reject); } else { this._sendMessageRequest(channel, content, file, tts, nonce, resolve, reject); } @@ -79,22 +78,24 @@ class RESTMethods { _sendMessageRequest(channel, content, file, tts, nonce, resolve, reject) { if (content instanceof Array) { const datas = []; - const promise = this.rest.makeRequest('post', Constants.Endpoints.channelMessages(channel.id), true, { + let promise = this.rest.makeRequest('post', Constants.Endpoints.channelMessages(channel.id), true, { content: content[0], tts, nonce, }, file).catch(reject); + for (let i = 1; i <= content.length; i++) { if (i < content.length) { - promise.then(data => { + const i2 = i; + promise = promise.then(data => { datas.push(data); return this.rest.makeRequest('post', Constants.Endpoints.channelMessages(channel.id), true, { - content: content[i], tts, nonce, + content: content[i2], tts, nonce, }, file); - }); + }).catch(reject); } else { promise.then(data => { datas.push(data); resolve(this.rest.client.actions.MessageCreate.handle(datas).messages); - }); + }).catch(reject); } } } else { From 13aae621b86726f763ae3c689273f973b95b31e7 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sun, 16 Oct 2016 20:58:03 -0400 Subject: [PATCH 114/188] Fix Hyper's error and make it more useful --- src/client/websocket/WebSocketManager.js | 3 ++- src/util/Constants.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index bc22249d2..7e7a03b92 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -265,7 +265,8 @@ class WebSocketManager extends EventEmitter { if (this.client.options.fetchAllMembers) { const promises = this.client.guilds.array().map(g => g.fetchMembers()); Promise.all(promises).then(() => this._emitReady()).catch(e => { - this.client.emit(Constants.Event.WARN, `Error on pre-ready guild member fetching - ${e}`); + this.client.emit(Constants.Events.WARN, 'Error in pre-ready guild member fetching'); + this.client.emit(Constants.Events.ERROR, e); this._emitReady(); }); return; diff --git a/src/util/Constants.js b/src/util/Constants.js index e6a33d7d1..b190b53cc 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -190,6 +190,7 @@ exports.Events = { TYPING_STOP: 'typingStop', DISCONNECT: 'disconnect', RECONNECTING: 'reconnecting', + ERROR: 'error', WARN: 'warn', DEBUG: 'debug', }; From fc307fab8a61aef7e668e4f5206d10d43d2c9102 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sun, 16 Oct 2016 21:14:59 -0400 Subject: [PATCH 115/188] Remove unnecessary array conversions --- docs/docs.json | 2 +- src/client/Client.js | 6 +++--- src/client/websocket/WebSocketManager.js | 2 +- src/structures/Emoji.js | 2 +- src/structures/GroupDMChannel.js | 4 ++-- src/structures/interface/TextBasedChannel.js | 5 +++-- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index e9f1505f3..7a132cb55 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476504733906},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":74,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":87,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":97,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"WebhookMessageOptions","name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476666874061},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array or collection of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]],[["Collection",".<"],["string",", "],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":286,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.first();\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":74,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":87,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":97,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#filterArray","name":"filterArray","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":238,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":253,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":268,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":283,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":295,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":309,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"WebhookMessageOptions","name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/client/Client.js b/src/client/Client.js index 652c11f16..58e7f595f 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -251,13 +251,13 @@ class Client extends EventEmitter { /** * This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however * if you wish to force a sync of Guild data, you can use this. Only applicable to user accounts. - * @param {Guild[]} [guilds=this.guilds.array()] An array of guilds to sync + * @param {Guild[]|Collection} [guilds=this.guilds] An array or collection of guilds to sync */ - syncGuilds(guilds = this.guilds.array()) { + syncGuilds(guilds = this.guilds) { if (!this.user.bot) { this.ws.send({ op: 12, - d: guilds.map(g => g.id), + d: guilds instanceof Collection ? guilds.keyArray() : guilds.map(g => g.id), }); } } diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index 7e7a03b92..8f7110613 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -263,7 +263,7 @@ class WebSocketManager extends EventEmitter { if (unavailableCount === 0) { this.status = Constants.Status.NEARLY; if (this.client.options.fetchAllMembers) { - const promises = this.client.guilds.array().map(g => g.fetchMembers()); + const promises = this.client.guilds.map(g => g.fetchMembers()); Promise.all(promises).then(() => this._emitReady()).catch(e => { this.client.emit(Constants.Events.WARN, 'Error in pre-ready guild member fetching'); this.client.emit(Constants.Events.ERROR, e); diff --git a/src/structures/Emoji.js b/src/structures/Emoji.js index a4b8c1ce4..0349b6f70 100644 --- a/src/structures/Emoji.js +++ b/src/structures/Emoji.js @@ -95,7 +95,7 @@ class Emoji { * @returns {string} * @example * // send an emoji: - * const emoji = guild.emojis.array()[0]; + * const emoji = guild.emojis.first(); * msg.reply(`Hello! ${emoji}`); */ toString() { diff --git a/src/structures/GroupDMChannel.js b/src/structures/GroupDMChannel.js index d37baa6bf..cfeea2555 100644 --- a/src/structures/GroupDMChannel.js +++ b/src/structures/GroupDMChannel.js @@ -101,8 +101,8 @@ class GroupDMChannel extends Channel { this.ownerID === channel.ownerID; if (equal) { - const thisIDs = this.recipients.array().map(r => r.id); - const otherIDs = channel.recipients.map(r => r.id); + const thisIDs = this.recipients.keyArray(); + const otherIDs = channel.recipients.keyArray(); return arraysEqual(thisIDs, otherIDs); } diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 72dcbacf3..406948701 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -316,8 +316,9 @@ class TextBasedChannel { * @returns {Collection} */ bulkDelete(messages) { - if (messages instanceof Collection) messages = messages.array(); - if (!(messages instanceof Array)) return Promise.reject(new TypeError('Messages must be an Array or Collection.')); + if (!(messages instanceof Array || messages instanceof Collection)) { + return Promise.reject(new TypeError('Messages must be an Array or Collection.')); + } const messageIDs = messages.map(m => m.id); return this.client.rest.methods.bulkDeleteMessages(this, messageIDs); } From e04dbbdb827970cb842918131cfe6a44f6d17683 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Sun, 16 Oct 2016 20:28:17 -0500 Subject: [PATCH 116/188] add clientuser#friends (#807) * add client#friends * Update Ready.js * Update Client.js * move friends to client.user * Update ClientUser.js * Update ClientUser.js --- docs/docs.json | 2 +- src/client/websocket/packets/handlers/Ready.js | 5 +++++ src/structures/ClientUser.js | 8 ++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 7a132cb55..c3893e779 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476666874061},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array or collection of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]],[["Collection",".<"],["string",", "],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":286,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.first();\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":74,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":87,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":97,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#filterArray","name":"filterArray","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":238,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":253,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":268,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":283,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":295,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":309,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"WebhookMessageOptions","name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476667009223},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array or collection of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]],[["Collection",".<"],["string",", "],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":286,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nIf you do not select an amount of shards, the manager will automatically decide the best amount.\nThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":8,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":50,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":65,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":80,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":94,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":103,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":113,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":125,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":134,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":16,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#friends","name":"friends","description":"A Collection of friends for the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":31,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.first();\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":74,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":87,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":97,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#filterArray","name":"filterArray","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":238,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":253,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":268,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":283,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":295,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":309,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"WebhookMessageOptions","name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file diff --git a/src/client/websocket/packets/handlers/Ready.js b/src/client/websocket/packets/handlers/Ready.js index b6f3e1e1d..eceb36103 100644 --- a/src/client/websocket/packets/handlers/Ready.js +++ b/src/client/websocket/packets/handlers/Ready.js @@ -16,6 +16,11 @@ class ReadyHandler extends AbstractHandler { for (const guild of data.guilds) client.dataManager.newGuild(guild); for (const privateDM of data.private_channels) client.dataManager.newChannel(privateDM); + for (const relation of data.relationships) { + const friend = client.dataManager.newUser(relation.user); + client.user.friends.set(friend.id, friend); + } + data.presences = data.presences || []; for (const presence of data.presences) { client.dataManager.newUser(presence.user); diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index 24b36bb42..cf6fee66b 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -1,4 +1,5 @@ const User = require('./User'); +const Collection = require('../util/Collection'); /** * Represents the logged in client's Discord User @@ -21,6 +22,13 @@ class ClientUser extends User { this.email = data.email; this.localPresence = {}; this._typing = new Map(); + + /** + * A Collection of friends for the logged in user. + * This is only filled for user accounts, not bot accounts! + * @type {Collection} + */ + this.friends = new Collection(); } edit(data) { From 62b93659e626f04a96f751bc7ebb729ba0c13499 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Mon, 17 Oct 2016 00:02:48 -0400 Subject: [PATCH 117/188] Clean up and simplify some code --- src/structures/EvaluatedPermissions.js | 2 +- src/structures/GuildChannel.js | 8 ++++---- src/structures/GuildMember.js | 2 +- src/structures/Role.js | 2 +- src/structures/interface/TextBasedChannel.js | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/structures/EvaluatedPermissions.js b/src/structures/EvaluatedPermissions.js index a4462692a..de92c10d7 100644 --- a/src/structures/EvaluatedPermissions.js +++ b/src/structures/EvaluatedPermissions.js @@ -50,7 +50,7 @@ class EvaluatedPermissions { * @returns {boolean} */ hasPermissions(permissions, explicit = false) { - return permissions.map(p => this.hasPermission(p, explicit)).every(v => v); + return permissions.every(p => this.hasPermission(p, explicit)); } /** diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index 3eb97a4f6..de1cd2726 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -239,12 +239,12 @@ class GuildChannel extends Channel { this.name === channel.name; if (equal) { - if (channel.permission_overwrites) { - const thisIDSet = Array.from(this.permissionOverwrites.keys()); - const otherIDSet = channel.permission_overwrites.map(overwrite => overwrite.id); + if (this.permissionOverwrites && channel.permissionOverwrites) { + const thisIDSet = this.permissionOverwrites.keyArray(); + const otherIDSet = channel.permissionOverwrites.keyArray(); equal = arraysEqual(thisIDSet, otherIDSet); } else { - equal = false; + equal = !this.permissionOverwrites && !channel.permissionOverwrites; } } diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index c296aaab4..71472c002 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -248,7 +248,7 @@ class GuildMember { */ hasPermissions(permissions, explicit = false) { if (!explicit && this.user.id === this.guild.ownerID) return true; - return permissions.map(p => this.hasPermission(p, explicit)).every(v => v); + return permissions.every(p => this.hasPermission(p, explicit)); } /** diff --git a/src/structures/Role.js b/src/structures/Role.js index 2c884c26c..f2a52ac87 100644 --- a/src/structures/Role.js +++ b/src/structures/Role.js @@ -150,7 +150,7 @@ class Role { * @returns {boolean} */ hasPermissions(permissions, explicit = false) { - return permissions.map(p => this.hasPermission(p, explicit)).every(v => v); + return permissions.every(p => this.hasPermission(p, explicit)); } /** diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 406948701..5687828bb 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -319,7 +319,7 @@ class TextBasedChannel { if (!(messages instanceof Array || messages instanceof Collection)) { return Promise.reject(new TypeError('Messages must be an Array or Collection.')); } - const messageIDs = messages.map(m => m.id); + const messageIDs = messages instanceof Collection ? messages.keyArray() : messages.map(m => m.id); return this.client.rest.methods.bulkDeleteMessages(this, messageIDs); } From bd5540314b8a2247f755718b09f3872e1a79321e Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Mon, 17 Oct 2016 21:24:16 -0500 Subject: [PATCH 118/188] add message@#type --- docs/docs.json | 2 +- src/structures/Message.js | 6 ++++++ src/util/Constants.js | 10 ++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index c3893e779..0f1d4cacb 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476667009223},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array or collection of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]],[["Collection",".<"],["string",", "],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":286,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nIf you do not select an amount of shards, the manager will automatically decide the best amount.\nThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":8,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":50,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":65,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":80,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":94,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":103,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":113,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":125,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":134,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":16,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#friends","name":"friends","description":"A Collection of friends for the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":31,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.first();\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":74,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":87,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":97,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#filterArray","name":"filterArray","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":238,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":253,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":268,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":283,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":295,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":309,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"WebhookMessageOptions","name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476757431844},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array or collection of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]],[["Collection",".<"],["string",", "],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":286,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nIf you do not select an amount of shards, the manager will automatically decide the best amount.\nThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":8,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":50,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":65,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":80,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":94,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":103,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":113,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":125,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":134,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":16,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#friends","name":"friends","description":"A Collection of friends for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":31,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.first();\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":331,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":341,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":350,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":358,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":372,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":393,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":414,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":443,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#type","name":"type","description":"The type of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":107,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":118,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":209,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":218,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":227,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":237,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":276,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":285,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":294,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":305,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":74,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":87,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":97,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#filterArray","name":"filterArray","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":238,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":253,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":268,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":283,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":295,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":309,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"WebhookMessageOptions","name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file diff --git a/src/structures/Message.js b/src/structures/Message.js index ca42645b6..6b0ae77c3 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -32,6 +32,12 @@ class Message { */ this.id = data.id; + /** + * The type of the message + * @type {string} + */ + this.type = Constants.MessageTypes[data.type]; + /** * The content of the message * @type {string} diff --git a/src/util/Constants.js b/src/util/Constants.js index b190b53cc..d8d326a5e 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -227,6 +227,16 @@ exports.WSEvents = { VOICE_SERVER_UPDATE: 'VOICE_SERVER_UPDATE', }; +exports.MessageTypes = { + 0: 'DEFAULT', + 1: 'RECIPIENT_ADD', + 2: 'RECIPIENT_REMOVE', + 3: 'CALL', + 4: 'CHANNEL_NAME_CHANGE', + 5: 'CHANNEL_ICON_CHANGE', + 6: 'PINS_ADD', +}; + const PermissionFlags = exports.PermissionFlags = { CREATE_INSTANT_INVITE: 1 << 0, KICK_MEMBERS: 1 << 1, From 9c8eb2dfc3e72dc9c6ffd5edb71d02426c1738b9 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Tue, 18 Oct 2016 00:36:25 -0500 Subject: [PATCH 119/188] lets all be friendly! (#809) * lets all be friendly! * fix doc * Update ClientUser.js * Update ClientUser.js --- docs/docs.json | 2 +- src/client/rest/RESTMethods.js | 20 ++++++++++++++++++++ src/structures/ClientUser.js | 22 ++++++++++++++++++++++ src/util/Constants.js | 1 + 4 files changed, 44 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 0f1d4cacb..7debed043 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476757431844},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array or collection of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]],[["Collection",".<"],["string",", "],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":286,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nIf you do not select an amount of shards, the manager will automatically decide the best amount.\nThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":8,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":50,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":65,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":80,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":94,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":103,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":113,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":125,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":134,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":16,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#friends","name":"friends","description":"A Collection of friends for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":31,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.first();\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":331,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":341,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":350,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":358,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":372,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":393,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":414,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":443,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#type","name":"type","description":"The type of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":107,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":118,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":209,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":218,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":227,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":237,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":276,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":285,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":294,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":305,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":74,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":87,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":97,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#filterArray","name":"filterArray","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":238,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":253,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":268,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":283,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":295,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":309,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"WebhookMessageOptions","name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476758069041},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array or collection of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]],[["Collection",".<"],["string",", "],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":286,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nIf you do not select an amount of shards, the manager will automatically decide the best amount.\nThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":8,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":50,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":65,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":80,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":94,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":103,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":113,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":125,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#addFriend","name":"addFriend","description":"Send a friend request\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":135,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"userOrID","description":"The user to send the friend request to.","type":{"types":[[["UserResolveable",""]]]}}]},{"id":"ClientUser#removeFriend","name":"removeFriend","description":"Remove a friend\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":146,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"userOrID","description":"The user to remove from your friends","type":{"types":[[["UserResolveable",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":156,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":16,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#friends","name":"friends","description":"A Collection of friends for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":31,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.first();\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":331,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":341,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":350,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":358,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":372,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":393,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":414,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":443,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#type","name":"type","description":"The type of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":107,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":118,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":209,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":218,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":227,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":237,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":276,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":285,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":294,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":305,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":74,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":87,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":97,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#filterArray","name":"filterArray","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":238,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":253,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":268,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":283,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":295,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":309,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"WebhookMessageOptions","name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index e885ac50b..58a1f931c 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -638,6 +638,26 @@ class RESTMethods { }).catch(reject); }); } + + addFriend(user) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('post', Constants.Endpoints.relationships('@me'), true, { + discriminator: user.discriminator, + username: user.username, + }).then(() => { + resolve(user); + }).catch(reject); + }); + } + + removeFriend(user) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('delete', `${Constants.Endpoints.relationships('@me')}/${user.id}`, true) + .then(() => { + resolve(user); + }).catch(reject); + }); + } } module.exports = RESTMethods; diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index cf6fee66b..c4a8b14a6 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -126,6 +126,28 @@ class ClientUser extends User { return this.setPresence({ afk }); } + /** + * Send a friend request + * This is only available for user accounts, not bot accounts! + * @param {UserResolvable} user The user to send the friend request to. + * @returns {Promise} The user the friend request was sent to. + */ + addFriend(user) { + user = this.client.resolver.resolveUser(user); + return this.client.rest.methods.addFriend(user); + } + + /** + * Remove a friend + * This is only available for user accounts, not bot accounts! + * @param {UserResolvable} user The user to remove from your friends + * @returns {Promise} The user that was removed + */ + removeFriend(user) { + user = this.client.resolver.resolveUser(user); + return this.client.rest.methods.removeFriend(user); + } + /** * Set the full presence of the current user. * @param {Object} data the data to provide diff --git a/src/util/Constants.js b/src/util/Constants.js index d8d326a5e..289d5e353 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -83,6 +83,7 @@ const Endpoints = exports.Endpoints = { avatar: (userID, avatar) => userID === '1' ? avatar : `${Endpoints.user(userID)}/avatars/${avatar}.jpg`, me: `${API}/users/@me`, meGuild: (guildID) => `${Endpoints.me}/guilds/${guildID}`, + relationships: (userID) => `${Endpoints.user(userID)}/relationships`, // guilds guilds: `${API}/guilds`, From d0463926c4c5f5677ed5dd13dc30b0b650481b2c Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Tue, 18 Oct 2016 21:23:35 -0400 Subject: [PATCH 120/188] Add maxMatches CollectorOption --- src/structures/MessageCollector.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/structures/MessageCollector.js b/src/structures/MessageCollector.js index 48234d4a4..375bc845a 100644 --- a/src/structures/MessageCollector.js +++ b/src/structures/MessageCollector.js @@ -24,6 +24,7 @@ class MessageCollector extends EventEmitter { * @typedef {Object} CollectorOptions * @property {number} [time] Duration for the collector in milliseconds * @property {number} [max] Maximum number of messages to handle + * @property {number} [maxMatches] Maximum number of successfully filtered messages to obtain */ /** @@ -86,7 +87,8 @@ class MessageCollector extends EventEmitter { * @event MessageCollector#message */ this.emit('message', message, this); - if (this.options.max && this.collected.size === this.options.max) this.stop('limit'); + if (this.collected.size >= this.options.maxMatches) this.stop('matchesLimit'); + else if (this.options.max && this.collected.size === this.options.max) this.stop('limit'); return true; } return false; From caec3648c01cf85774adeb4adb2666475c9564b7 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Fri, 21 Oct 2016 02:35:36 -0400 Subject: [PATCH 121/188] Added onlyInlineCode to escapeMarkdown --- src/util/EscapeMarkdown.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/util/EscapeMarkdown.js b/src/util/EscapeMarkdown.js index 01e01206f..9db8c13eb 100644 --- a/src/util/EscapeMarkdown.js +++ b/src/util/EscapeMarkdown.js @@ -1,4 +1,5 @@ -module.exports = function escapeMarkdown(text, onlyCodeBlock = false) { +module.exports = function escapeMarkdown(text, onlyCodeBlock = false, onlyInlineCode = false) { if (onlyCodeBlock) return text.replace(/```/g, '`\u200b``'); + if (onlyInlineCode) return text.replace(/\\(`|\\)/g, '$1').replace(/(`|\\)/g, '\\$1'); return text.replace(/\\(\*|_|`|~|\\)/g, '$1').replace(/(\*|_|`|~|\\)/g, '\\$1'); }; From aa4cb97a1c10d54e0ee8228961b2580b89b2f7e2 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sat, 22 Oct 2016 14:48:07 -0400 Subject: [PATCH 122/188] Removed production flag from installs --- README.md | 8 ++++---- docs/custom/documents/welcome.md | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 20c73fb01..11c637acf 100644 --- a/README.md +++ b/README.md @@ -16,9 +16,9 @@ discord.js is a powerful node.js module that allows you to interact with the [Di ## Installation **Node.js 6.0.0 or newer is required.** -Without voice support: `npm install discord.js --save --production` -With voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` -With voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` +Without voice support: `npm install discord.js --save` +With voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save` +With voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save` If both audio packages are installed, discord.js will automatically choose node-opus. The preferred audio engine is node-opus, as it performs significantly better than opusscript. @@ -56,7 +56,7 @@ A bot template using discord.js can be generated using [generator-discordbot](ht * [NPM](https://www.npmjs.com/package/discord.js) * [Related libraries](https://discordapi.com/unofficial/libs.html) -## Contributing +## Contributing Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the [documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master). See [the contributing guide](CONTRIBUTING.md) if you'd like to submit a PR. diff --git a/docs/custom/documents/welcome.md b/docs/custom/documents/welcome.md index dccf80bbd..d2b50758c 100644 --- a/docs/custom/documents/welcome.md +++ b/docs/custom/documents/welcome.md @@ -20,9 +20,9 @@ stable and performant than previous versions. ## Installation **Node.js 6.0.0 or newer is required.** -Without voice support: `npm install discord.js --save --production` -With voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` -With voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` +Without voice support: `npm install discord.js --save` +With voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save` +With voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save` If both audio packages are installed, discord.js will automatically prefer node-opus. The preferred audio engine is node-opus, as it performs significantly better than opusscript. From 9f7c63079675aae22c0859c1f01ff51e9daf1f0e Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Sat, 22 Oct 2016 13:51:21 -0500 Subject: [PATCH 123/188] lel (#824) --- src/sharding/ShardingManager.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sharding/ShardingManager.js b/src/sharding/ShardingManager.js index 911fa47b7..d88678954 100644 --- a/src/sharding/ShardingManager.js +++ b/src/sharding/ShardingManager.js @@ -108,6 +108,7 @@ class ShardingManager extends EventEmitter { return new Promise((resolve, reject) => { if (amount === 'auto') { getRecommendedShards(this.token).then(count => { + this.totalShards = count; resolve(this._spawn(count, delay)); }).catch(reject); } else { From 422b90c71151565f1d97232d72d8f7dac1776415 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Sat, 22 Oct 2016 15:25:55 -0500 Subject: [PATCH 124/188] add way more friend shit (#815) --- docs/docs.json | 2 +- src/client/rest/RESTMethods.js | 18 +++++++++++ .../packets/WebSocketPacketManager.js | 2 ++ .../websocket/packets/handlers/Ready.js | 8 +++-- .../packets/handlers/RelationshipAdd.js | 19 +++++++++++ .../packets/handlers/RelationshipRemove.js | 19 +++++++++++ src/structures/ClientUser.js | 7 ++++ src/structures/User.js | 32 +++++++++++++++++++ src/util/Constants.js | 2 ++ 9 files changed, 106 insertions(+), 3 deletions(-) create mode 100644 src/client/websocket/packets/handlers/RelationshipAdd.js create mode 100644 src/client/websocket/packets/handlers/RelationshipRemove.js diff --git a/docs/docs.json b/docs/docs.json index 7debed043..c6709ab30 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476758069041},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array or collection of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]],[["Collection",".<"],["string",", "],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":286,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nIf you do not select an amount of shards, the manager will automatically decide the best amount.\nThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":8,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":50,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":65,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":80,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":94,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":103,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":113,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":125,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#addFriend","name":"addFriend","description":"Send a friend request\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":135,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"userOrID","description":"The user to send the friend request to.","type":{"types":[[["UserResolveable",""]]]}}]},{"id":"ClientUser#removeFriend","name":"removeFriend","description":"Remove a friend\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":146,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"userOrID","description":"The user to remove from your friends","type":{"types":[[["UserResolveable",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":156,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":16,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#friends","name":"friends","description":"A Collection of friends for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":31,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.first();\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":331,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":341,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":350,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":358,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":372,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":393,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":414,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":443,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#type","name":"type","description":"The type of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":107,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":118,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":209,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":218,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":227,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":237,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":276,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":285,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":294,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":305,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":74,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":87,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":97,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#filterArray","name":"filterArray","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":238,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":253,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":268,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":283,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":295,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":309,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"WebhookMessageOptions","name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476979959835},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array or collection of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]],[["Collection",".<"],["string",", "],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":286,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nIf you do not select an amount of shards, the manager will automatically decide the best amount.\nThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":8,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":87,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":101,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":110,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":120,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":132,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#addFriend","name":"addFriend","description":"Send a friend request\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":142,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to send the friend request to.","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"ClientUser#removeFriend","name":"removeFriend","description":"Remove a friend\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":153,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to remove from your friends","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":163,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#block","name":"block","description":"Blocks the user","memberof":"ClientUser","inherits":"User#block","inherited":true,"meta":{"line":158,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"ClientUser#unblock","name":"unblock","description":"Unblocks the user","memberof":"ClientUser","inherits":"User#unblock","inherited":true,"meta":{"line":166,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":176,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":194,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":16,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#friends","name":"friends","description":"A Collection of friends for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":31,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#blocked","name":"blocked","description":"A Collection of blocked users for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":38,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.first();\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":331,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":341,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":350,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":358,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":372,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":393,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":414,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":443,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#type","name":"type","description":"The type of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":107,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":118,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":209,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":218,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":227,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":237,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":276,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":285,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":294,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":305,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":134,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":42,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":48,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":54,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":66,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":83,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":138,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#addFriend","name":"addFriend","description":"Sends a friend request to the user","memberof":"User","meta":{"line":142,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#removeFriend","name":"removeFriend","description":"Removes the user from your friends","memberof":"User","meta":{"line":150,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#block","name":"block","description":"Blocks the user","memberof":"User","meta":{"line":158,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#unblock","name":"unblock","description":"Unblocks the user","memberof":"User","meta":{"line":166,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":176,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":194,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":74,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":87,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":97,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#filterArray","name":"filterArray","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":238,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":253,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":268,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":283,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":295,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":309,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMatches","description":"Maximum number of successfully filtered messages to obtain","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"WebhookMessageOptions","name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 58a1f931c..711c47653 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -658,6 +658,24 @@ class RESTMethods { }).catch(reject); }); } + + blockUser(user) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('put', `${Constants.Endpoints.relationships('@me')}/${user.id}`, true, { type: 2 }) + .then(() => { + resolve(user); + }).catch(reject); + }); + } + + unblockUser(user) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('delete', `${Constants.Endpoints.relationships('@me')}/${user.id}`, true) + .then(() => { + resolve(user); + }).catch(reject); + }); + } } module.exports = RESTMethods; diff --git a/src/client/websocket/packets/WebSocketPacketManager.js b/src/client/websocket/packets/WebSocketPacketManager.js index 31e08d0fb..6d49ee257 100644 --- a/src/client/websocket/packets/WebSocketPacketManager.js +++ b/src/client/websocket/packets/WebSocketPacketManager.js @@ -42,6 +42,8 @@ class WebSocketPacketManager { this.register(Constants.WSEvents.MESSAGE_DELETE_BULK, 'MessageDeleteBulk'); this.register(Constants.WSEvents.CHANNEL_PINS_UPDATE, 'ChannelPinsUpdate'); this.register(Constants.WSEvents.GUILD_SYNC, 'GuildSync'); + this.register(Constants.WSEvents.RELATIONSHIP_ADD, 'RelationshipAdd'); + this.register(Constants.WSEvents.RELATIONSHIP_REMOVE, 'RelationshipRemove'); } get client() { diff --git a/src/client/websocket/packets/handlers/Ready.js b/src/client/websocket/packets/handlers/Ready.js index eceb36103..b512c962d 100644 --- a/src/client/websocket/packets/handlers/Ready.js +++ b/src/client/websocket/packets/handlers/Ready.js @@ -17,8 +17,12 @@ class ReadyHandler extends AbstractHandler { for (const privateDM of data.private_channels) client.dataManager.newChannel(privateDM); for (const relation of data.relationships) { - const friend = client.dataManager.newUser(relation.user); - client.user.friends.set(friend.id, friend); + const user = client.dataManager.newUser(relation.user); + if (relation.type === 1) { + client.user.friends.set(user.id, user); + } else if (relation.type === 2) { + client.user.blocked.set(user.id, user); + } } data.presences = data.presences || []; diff --git a/src/client/websocket/packets/handlers/RelationshipAdd.js b/src/client/websocket/packets/handlers/RelationshipAdd.js new file mode 100644 index 000000000..122b4c507 --- /dev/null +++ b/src/client/websocket/packets/handlers/RelationshipAdd.js @@ -0,0 +1,19 @@ +const AbstractHandler = require('./AbstractHandler'); + +class RelationshipAddHandler extends AbstractHandler { + handle(packet) { + const client = this.packetManager.client; + const data = packet.d; + if (data.type === 1) { + client.fetchUser(data.id).then(user => { + client.user.friends.set(user.id, user); + }); + } else if (data.type === 2) { + client.fetchUser(data.id).then(user => { + client.user.blocked.set(user.id, user); + }); + } + } +} + +module.exports = RelationshipAddHandler; diff --git a/src/client/websocket/packets/handlers/RelationshipRemove.js b/src/client/websocket/packets/handlers/RelationshipRemove.js new file mode 100644 index 000000000..b57326ad6 --- /dev/null +++ b/src/client/websocket/packets/handlers/RelationshipRemove.js @@ -0,0 +1,19 @@ +const AbstractHandler = require('./AbstractHandler'); + +class RelationshipRemoveHandler extends AbstractHandler { + handle(packet) { + const client = this.packetManager.client; + const data = packet.d; + if (data.type === 2) { + if (client.user.blocked.has(data.id)) { + client.user.blocked.delete(data.id); + } + } else if (data.type === 1) { + if (client.user.friends.has(data.id)) { + client.user.friends.delete(data.id); + } + } + } +} + +module.exports = RelationshipRemoveHandler; diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index c4a8b14a6..eff683887 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -29,6 +29,13 @@ class ClientUser extends User { * @type {Collection} */ this.friends = new Collection(); + + /** + * A Collection of blocked users for the logged in user. + * This is only filled for user accounts, not bot accounts! + * @type {Collection} + */ + this.blocked = new Collection(); } edit(data) { diff --git a/src/structures/User.js b/src/structures/User.js index 2e1dbc6ed..5eaea7aba 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -135,6 +135,38 @@ class User { return this.client.rest.methods.deleteChannel(this); } + /** + * Sends a friend request to the user + * @returns {Promise} + */ + addFriend() { + return this.client.rest.methods.addFriend(this); + } + + /** + * Removes the user from your friends + * @returns {Promise} + */ + removeFriend() { + return this.client.rest.methods.removeFriend(this); + } + + /** + * Blocks the user + * @returns {Promise} + */ + block() { + return this.client.rest.methods.blockUser(this); + } + + /** + * Unblocks the user + * @returns {Promise} + */ + unblock() { + return this.client.rest.methods.unblockUser(this); + } + /** * Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played. * It is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties. diff --git a/src/util/Constants.js b/src/util/Constants.js index 289d5e353..2adb29dae 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -226,6 +226,8 @@ exports.WSEvents = { FRIEND_ADD: 'RELATIONSHIP_ADD', FRIEND_REMOVE: 'RELATIONSHIP_REMOVE', VOICE_SERVER_UPDATE: 'VOICE_SERVER_UPDATE', + RELATIONSHIP_ADD: 'RELATIONSHIP_ADD', + RELATIONSHIP_REMOVE: 'RELATIONSHIP_REMOVE', }; exports.MessageTypes = { From b020fae258ff5cb0f135b573b5417347cde11ab2 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Sat, 22 Oct 2016 22:43:07 -0500 Subject: [PATCH 125/188] fix emoji updates (#826) --- docs/docs.json | 2 +- src/client/ClientDataManager.js | 6 ++++++ src/client/actions/GuildEmojiUpdate.js | 12 +++++++----- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index c6709ab30..14157831d 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476979959835},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array or collection of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]],[["Collection",".<"],["string",", "],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":286,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nIf you do not select an amount of shards, the manager will automatically decide the best amount.\nThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":8,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":87,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":101,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":110,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":120,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":132,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#addFriend","name":"addFriend","description":"Send a friend request\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":142,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to send the friend request to.","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"ClientUser#removeFriend","name":"removeFriend","description":"Remove a friend\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":153,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to remove from your friends","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":163,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#block","name":"block","description":"Blocks the user","memberof":"ClientUser","inherits":"User#block","inherited":true,"meta":{"line":158,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"ClientUser#unblock","name":"unblock","description":"Unblocks the user","memberof":"ClientUser","inherits":"User#unblock","inherited":true,"meta":{"line":166,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":176,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":194,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":16,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#friends","name":"friends","description":"A Collection of friends for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":31,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#blocked","name":"blocked","description":"A Collection of blocked users for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":38,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.first();\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":331,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":341,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":350,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":358,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":372,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":393,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":414,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":443,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#type","name":"type","description":"The type of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":107,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":118,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":209,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":218,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":227,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":237,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":276,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":285,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":294,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":305,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":134,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":42,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":48,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":54,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":66,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":83,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":138,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#addFriend","name":"addFriend","description":"Sends a friend request to the user","memberof":"User","meta":{"line":142,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#removeFriend","name":"removeFriend","description":"Removes the user from your friends","memberof":"User","meta":{"line":150,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#block","name":"block","description":"Blocks the user","memberof":"User","meta":{"line":158,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#unblock","name":"unblock","description":"Unblocks the user","memberof":"User","meta":{"line":166,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":176,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":194,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":74,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":87,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":97,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#filterArray","name":"filterArray","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":238,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":253,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":268,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":283,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":295,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":309,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMatches","description":"Maximum number of successfully filtered messages to obtain","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"WebhookMessageOptions","name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1477179544721},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array or collection of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]],[["Collection",".<"],["string",", "],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":23,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"oldEmoji","description":"The old emoji","type":{"types":[[["Emoji",""]]]}},{"name":"newEmoji","description":"The new emoji","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":286,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nIf you do not select an amount of shards, the manager will automatically decide the best amount.\nThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":161,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":172,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":187,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":8,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":87,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":101,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":110,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":120,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":132,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#addFriend","name":"addFriend","description":"Send a friend request\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":142,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to send the friend request to.","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"ClientUser#removeFriend","name":"removeFriend","description":"Remove a friend\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":153,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to remove from your friends","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":163,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#block","name":"block","description":"Blocks the user","memberof":"ClientUser","inherits":"User#block","inherited":true,"meta":{"line":158,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"ClientUser#unblock","name":"unblock","description":"Unblocks the user","memberof":"ClientUser","inherits":"User#unblock","inherited":true,"meta":{"line":166,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":176,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":194,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":16,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#friends","name":"friends","description":"A Collection of friends for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":31,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#blocked","name":"blocked","description":"A Collection of blocked users for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":38,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.first();\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":331,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":341,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":350,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":358,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":372,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":393,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":414,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":443,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#type","name":"type","description":"The type of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":107,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":118,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":209,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":218,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":227,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":237,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":276,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":285,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":294,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":305,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":134,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":42,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":48,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":54,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":66,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":83,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":138,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#addFriend","name":"addFriend","description":"Sends a friend request to the user","memberof":"User","meta":{"line":142,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#removeFriend","name":"removeFriend","description":"Removes the user from your friends","memberof":"User","meta":{"line":150,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#block","name":"block","description":"Blocks the user","memberof":"User","meta":{"line":158,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#unblock","name":"unblock","description":"Unblocks the user","memberof":"User","meta":{"line":166,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":176,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":194,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":74,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":87,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":97,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#filterArray","name":"filterArray","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":238,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":253,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":268,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":283,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":295,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":309,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMatches","description":"Maximum number of successfully filtered messages to obtain","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"WebhookMessageOptions","name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file diff --git a/src/client/ClientDataManager.js b/src/client/ClientDataManager.js index e56a8f6a8..7d837d970 100644 --- a/src/client/ClientDataManager.js +++ b/src/client/ClientDataManager.js @@ -118,6 +118,12 @@ class ClientDataManager { updateChannel(currentChannel, newData) { currentChannel.setup(newData); } + + updateEmoji(currentEmoji, newData) { + const oldEmoji = cloneObject(currentEmoji); + currentEmoji.setup(newData); + this.client.emit(Constants.Events.GUILD_EMOJI_UPDATE, oldEmoji, currentEmoji); + } } module.exports = ClientDataManager; diff --git a/src/client/actions/GuildEmojiUpdate.js b/src/client/actions/GuildEmojiUpdate.js index 087e42046..88e0c395c 100644 --- a/src/client/actions/GuildEmojiUpdate.js +++ b/src/client/actions/GuildEmojiUpdate.js @@ -1,13 +1,15 @@ const Action = require('./Action'); -const Constants = require('../../util/Constants'); class GuildEmojiUpdateAction extends Action { handle(data, guild) { const client = this.client; for (let emoji of data.emojis) { const already = guild.emojis.has(emoji.id); - emoji = client.dataManager.newEmoji(emoji, guild); - if (already) client.emit(Constants.Events.GUILD_EMOJI_UPDATE, guild, emoji); + if (already) { + client.dataManager.updateEmoji(guild.emojis.get(emoji.id), emoji); + } else { + emoji = client.dataManager.newEmoji(emoji, guild); + } } for (let emoji of guild.emojis) { if (!data.emoijs.has(emoji.id)) client.dataManager.killEmoji(emoji); @@ -21,7 +23,7 @@ class GuildEmojiUpdateAction extends Action { /** * Emitted whenever an emoji is updated * @event Client#guildEmojiUpdate - * @param {Guild} guild The guild that the emoji was updated in. - * @param {Emoji} emoji The emoji that was updated. + * @param {Emoji} oldEmoji The old emoji + * @param {Emoji} newEmoji The new emoji */ module.exports = GuildEmojiUpdateAction; From 38ff53c3a121771e6029d69adba7740764244473 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 23 Oct 2016 19:51:44 +0100 Subject: [PATCH 126/188] woah is hydra actually working on voice?! --- src/client/voice/ClientVoiceManager.js | 21 ++----------------- src/client/voice/VoiceConnection.js | 20 ++++++++++++++++-- ...nnectionUDPClient.js => VoiceUDPClient.js} | 6 ++++-- src/client/voice/VoiceWebSocket.js | 5 ++++- 4 files changed, 28 insertions(+), 24 deletions(-) rename src/client/voice/{VoiceConnectionUDPClient.js => VoiceUDPClient.js} (93%) diff --git a/src/client/voice/ClientVoiceManager.js b/src/client/voice/ClientVoiceManager.js index da089c945..cbc88feb5 100644 --- a/src/client/voice/ClientVoiceManager.js +++ b/src/client/voice/ClientVoiceManager.js @@ -160,25 +160,6 @@ class ClientVoiceManager { this.client.on('self.voiceStateUpdate', this.onVoiceStateUpdate.bind(this)); } - /** - * 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 { 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.once('disconnected', () => { - this.connections.delete(guildID); - }); - } - } - onVoiceServer(data) { if (this.pending.has(data.guild_id)) { this.pending.get(data.guild_id).setTokenAndEndpoint(data.token, data.endpoint); @@ -260,6 +241,8 @@ class ClientVoiceManager { pendingConnection.on('pass', voiceConnection => { this.pending.delete(channel.guild.id); this.connections.set(channel.guild.id, voiceConnection); + voiceConnection.once('ready', resolve); + voiceConnection.once('error', reject); }); }); } diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index cc1205d85..82b4d86e0 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -1,5 +1,5 @@ -const VoiceWebSocket = require('./VoiceConnectionWebSocket'); -const VoiceUDP = require('./VoiceConnectionUDPClient'); +const VoiceWebSocket = require('./VoiceWebSocket'); +const VoiceUDP = require('./VoiceUDPClient'); const VoiceReceiver = require('./receiver/VoiceReceiver'); const Constants = require('../../util/Constants'); const EventEmitter = require('events').EventEmitter; @@ -42,6 +42,7 @@ class VoiceConnection extends EventEmitter { * @type {object} */ this.sockets = {}; + this.connect(); } connect() { @@ -53,6 +54,21 @@ class VoiceConnection extends EventEmitter { } this.sockets.ws = new VoiceWebSocket(this); this.sockets.udp = new VoiceUDP(this); + this.sockets.ws.on('error', e => this.emit('error', e)); + this.sockets.udp.on('error', e => this.emit('error', e)); + this.sockets.ws.once('ready', d => { + this.authentication.port = d.port; + this.sockets.udp.findEndpointAddress() + .then(address => { + this.sockets.udp.createUDPSocket(address); + }) + .catch(e => this.emit('error', e)); + }); + this.sockets.ws.once('sessionDescription', (mode, secret) => { + this.authentication.encryptionMode = mode; + this.authentication.secretKey = secret; + this.emit('ready'); + }); } } diff --git a/src/client/voice/VoiceConnectionUDPClient.js b/src/client/voice/VoiceUDPClient.js similarity index 93% rename from src/client/voice/VoiceConnectionUDPClient.js rename to src/client/voice/VoiceUDPClient.js index 93c0a1c6a..65a6058ef 100644 --- a/src/client/voice/VoiceConnectionUDPClient.js +++ b/src/client/voice/VoiceUDPClient.js @@ -69,6 +69,7 @@ class VoiceConnectionUDPClient extends EventEmitter { reject(error); return; } + this.discordAddress = address; resolve(address); }); }); @@ -82,11 +83,12 @@ class VoiceConnectionUDPClient extends EventEmitter { send(packet) { return new Promise((resolve, reject) => { if (this.socket) { - if (!this.address || !this.port) { + if (!this.discordAddress || !this.discordPort) { + console.log(this); reject(new Error('malformed UDP address or port')); return; } - this.socket.send(packet, 0, packet.length, this.port, this.address, error => { + this.socket.send(packet, 0, packet.length, this.discordPort, this.discordAddress, error => { if (error) { reject(error); } else { diff --git a/src/client/voice/VoiceWebSocket.js b/src/client/voice/VoiceWebSocket.js index 3cb0d1541..af6a20685 100644 --- a/src/client/voice/VoiceWebSocket.js +++ b/src/client/voice/VoiceWebSocket.js @@ -21,6 +21,7 @@ class VoiceWebSocket extends EventEmitter { * @type {number} */ this.attempts = 0; + this.connect(); } /** @@ -95,6 +96,7 @@ class VoiceWebSocket extends EventEmitter { * @returns {Promise} */ sendPacket(packet) { + console.log('try send', packet); try { packet = JSON.stringify(packet); } catch (error) { @@ -127,7 +129,7 @@ class VoiceWebSocket extends EventEmitter { */ onMessage(event) { try { - return this.onPacket(JSON.stringify(event.data)); + return this.onPacket(JSON.parse(event.data)); } catch (error) { return this.onError(error); } @@ -163,6 +165,7 @@ class VoiceWebSocket extends EventEmitter { * @param {Object} packet the received packet * @event VoiceWebSocket#ready */ + console.log('hi', packet.d); this.emit('ready', packet.d); break; case Constants.VoiceOPCodes.SESSION_DESCRIPTION: From 3e1425af0435aa1ca6f73a955b379a2755bcc9ec Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Sun, 23 Oct 2016 13:51:54 -0500 Subject: [PATCH 127/188] allow TextBasedChannel#bulkDelete to take a number (#821) * useful * update docs * Update TextBasedChannel.js * update docs * fix docs * Update TextBasedChannel.js --- docs/docs.json | 2 +- src/structures/interface/TextBasedChannel.js | 21 ++++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 14157831d..7cd1a5bc0 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1477179544721},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array or collection of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]],[["Collection",".<"],["string",", "],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":23,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"oldEmoji","description":"The old emoji","type":{"types":[[["Emoji",""]]]}},{"name":"newEmoji","description":"The new emoji","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":286,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nIf you do not select an amount of shards, the manager will automatically decide the best amount.\nThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":161,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":172,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":187,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":8,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":87,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":101,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":110,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":120,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":132,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#addFriend","name":"addFriend","description":"Send a friend request\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":142,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to send the friend request to.","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"ClientUser#removeFriend","name":"removeFriend","description":"Remove a friend\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":153,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to remove from your friends","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":163,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#block","name":"block","description":"Blocks the user","memberof":"ClientUser","inherits":"User#block","inherited":true,"meta":{"line":158,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"ClientUser#unblock","name":"unblock","description":"Unblocks the user","memberof":"ClientUser","inherits":"User#unblock","inherited":true,"meta":{"line":166,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":176,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":194,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":16,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#friends","name":"friends","description":"A Collection of friends for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":31,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#blocked","name":"blocked","description":"A Collection of blocked users for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":38,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.first();\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":331,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":341,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":350,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":358,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":372,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":393,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":414,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":443,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#type","name":"type","description":"The type of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":107,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":118,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":209,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":218,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":227,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":237,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":276,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":285,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":294,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":305,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":134,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":42,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":48,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":54,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":66,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":83,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":138,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#addFriend","name":"addFriend","description":"Sends a friend request to the user","memberof":"User","meta":{"line":142,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#removeFriend","name":"removeFriend","description":"Removes the user from your friends","memberof":"User","meta":{"line":150,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#block","name":"block","description":"Blocks the user","memberof":"User","meta":{"line":158,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#unblock","name":"unblock","description":"Unblocks the user","memberof":"User","meta":{"line":166,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":176,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":194,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":74,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":87,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":97,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#filterArray","name":"filterArray","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":238,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":253,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":268,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":283,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":295,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":309,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMatches","description":"Maximum number of successfully filtered messages to obtain","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"WebhookMessageOptions","name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1477248499004},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array or collection of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]],[["Collection",".<"],["string",", "],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":23,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"oldEmoji","description":"The old emoji","type":{"types":[[["Emoji",""]]]}},{"name":"newEmoji","description":"The new emoji","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":286,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nIf you do not select an amount of shards, the manager will automatically decide the best amount.\nThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":161,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":172,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":187,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":8,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":87,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":101,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":110,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":120,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":132,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#addFriend","name":"addFriend","description":"Send a friend request\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":142,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to send the friend request to.","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"ClientUser#removeFriend","name":"removeFriend","description":"Remove a friend\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":153,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to remove from your friends","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":163,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#block","name":"block","description":"Blocks the user","memberof":"ClientUser","inherits":"User#block","inherited":true,"meta":{"line":158,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"ClientUser#unblock","name":"unblock","description":"Unblocks the user","memberof":"ClientUser","inherits":"User#unblock","inherited":true,"meta":{"line":166,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":176,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":194,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":16,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#friends","name":"friends","description":"A Collection of friends for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":31,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#blocked","name":"blocked","description":"A Collection of blocked users for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":38,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.first();\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":331,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":341,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":350,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":358,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":372,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":393,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":414,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":443,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#type","name":"type","description":"The type of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":107,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":118,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":209,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":218,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":227,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":237,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":276,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":285,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":294,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":305,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":134,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":42,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":48,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":54,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":66,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":83,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":138,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#addFriend","name":"addFriend","description":"Sends a friend request to the user","memberof":"User","meta":{"line":142,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#removeFriend","name":"removeFriend","description":"Removes the user from your friends","memberof":"User","meta":{"line":150,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#block","name":"block","description":"Blocks the user","memberof":"User","meta":{"line":158,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#unblock","name":"unblock","description":"Unblocks the user","memberof":"User","meta":{"line":166,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":176,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":194,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":74,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":87,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":97,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#filterArray","name":"filterArray","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":238,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":253,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":268,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":283,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":295,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":309,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMatches","description":"Maximum number of successfully filtered messages to obtain","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"WebhookMessageOptions","name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 5687828bb..d051f9f80 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -310,17 +310,22 @@ class TextBasedChannel { } /** - * Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after. + * Bulk delete given messages. * Only OAuth Bot accounts may use this method. - * @param {Collection|Message[]} messages The messages to delete - * @returns {Collection} + * @param {Collection|Message[]|number} messages Messages to delete, or number of messages to delete + * @returns {Promise>} Deleted messages */ bulkDelete(messages) { - if (!(messages instanceof Array || messages instanceof Collection)) { - return Promise.reject(new TypeError('Messages must be an Array or Collection.')); - } - const messageIDs = messages instanceof Collection ? messages.keyArray() : messages.map(m => m.id); - return this.client.rest.methods.bulkDeleteMessages(this, messageIDs); + return new Promise((resolve, reject) => { + if (!isNaN(messages)) { + this.fetchMessages({ limit: messages }).then(msgs => resolve(this.bulkDelete(msgs))); + } else if (messages instanceof Array || messages instanceof Collection) { + const messageIDs = messages instanceof Collection ? messages.keyArray() : messages.map(m => m.id); + resolve(this.client.rest.methods.bulkDeleteMessages(this, messageIDs)); + } else { + reject(new TypeError('Messages must be an Array, Collection, or number.')); + } + }); } _cacheMessage(message) { From c9c6e8a35787425189436ccc5d25ce8223f200c2 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sun, 23 Oct 2016 14:59:04 -0400 Subject: [PATCH 128/188] Added note about bot accounts to fetchMessage --- docs/docs.json | 2 +- src/structures/interface/TextBasedChannel.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 7cd1a5bc0..791e9f365 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1477248499004},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array or collection of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]],[["Collection",".<"],["string",", "],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":23,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"oldEmoji","description":"The old emoji","type":{"types":[[["Emoji",""]]]}},{"name":"newEmoji","description":"The new emoji","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":286,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nIf you do not select an amount of shards, the manager will automatically decide the best amount.\nThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":161,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":172,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":187,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":8,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":87,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":101,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":110,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":120,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":132,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#addFriend","name":"addFriend","description":"Send a friend request\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":142,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to send the friend request to.","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"ClientUser#removeFriend","name":"removeFriend","description":"Remove a friend\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":153,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to remove from your friends","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":163,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#block","name":"block","description":"Blocks the user","memberof":"ClientUser","inherits":"User#block","inherited":true,"meta":{"line":158,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"ClientUser#unblock","name":"unblock","description":"Unblocks the user","memberof":"ClientUser","inherits":"User#unblock","inherited":true,"meta":{"line":166,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":176,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":194,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":16,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#friends","name":"friends","description":"A Collection of friends for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":31,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#blocked","name":"blocked","description":"A Collection of blocked users for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":38,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.first();\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":331,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":341,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":350,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":358,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":372,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":393,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":414,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":443,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#type","name":"type","description":"The type of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":107,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":118,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":209,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":218,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":227,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":237,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":276,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":285,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":294,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":305,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":134,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":42,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":48,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":54,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":66,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":83,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":138,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#addFriend","name":"addFriend","description":"Sends a friend request to the user","memberof":"User","meta":{"line":142,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#removeFriend","name":"removeFriend","description":"Removes the user from your friends","memberof":"User","meta":{"line":150,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#block","name":"block","description":"Blocks the user","memberof":"User","meta":{"line":158,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#unblock","name":"unblock","description":"Unblocks the user","memberof":"User","meta":{"line":166,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":176,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":194,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":74,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":87,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":97,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#filterArray","name":"filterArray","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":238,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":253,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":268,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":283,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":295,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":309,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMatches","description":"Maximum number of successfully filtered messages to obtain","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"WebhookMessageOptions","name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1477249129825},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array or collection of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]],[["Collection",".<"],["string",", "],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":23,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"oldEmoji","description":"The old emoji","type":{"types":[[["Emoji",""]]]}},{"name":"newEmoji","description":"The new emoji","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":286,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":161,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":172,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":187,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":8,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":87,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":101,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":110,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":120,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":132,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#addFriend","name":"addFriend","description":"Send a friend request\rThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":142,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to send the friend request to.","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"ClientUser#removeFriend","name":"removeFriend","description":"Remove a friend\rThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":153,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to remove from your friends","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":163,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#block","name":"block","description":"Blocks the user","memberof":"ClientUser","inherits":"User#block","inherited":true,"meta":{"line":158,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"ClientUser#unblock","name":"unblock","description":"Unblocks the user","memberof":"ClientUser","inherits":"User#unblock","inherited":true,"meta":{"line":166,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":176,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":194,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":16,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#friends","name":"friends","description":"A Collection of friends for the logged in user.\rThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":31,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#blocked","name":"blocked","description":"A Collection of blocked users for the logged in user.\rThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":38,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.\rOnly OAuth bot accounts can use this method.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":133,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":165,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":204,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":232,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":300,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":319,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":248,"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":257,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.first();\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.\rOnly OAuth bot accounts can use this method.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":133,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":165,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":204,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":232,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":300,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":319,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":248,"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":257,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":331,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":341,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":350,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":358,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":372,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":393,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":414,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":443,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#type","name":"type","description":"The type of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":107,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":118,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":209,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":218,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":227,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":237,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":276,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":285,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":294,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":305,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":134,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":42,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":48,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":54,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":66,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":83,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":138,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.\rOnly OAuth bot accounts can use this method.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":133,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":165,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":204,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":232,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":300,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":319,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":248,"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":257,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#addFriend","name":"addFriend","description":"Sends a friend request to the user","memberof":"User","meta":{"line":142,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#removeFriend","name":"removeFriend","description":"Removes the user from your friends","memberof":"User","meta":{"line":150,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#block","name":"block","description":"Blocks the user","memberof":"User","meta":{"line":158,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#unblock","name":"unblock","description":"Unblocks the user","memberof":"User","meta":{"line":166,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":176,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":194,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":74,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":87,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":97,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#filterArray","name":"filterArray","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":238,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":253,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":268,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":283,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":295,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":309,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.\rOnly OAuth bot accounts can use this method.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":133,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":165,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":204,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":232,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":300,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":319,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":248,"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":257,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":145,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":280,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMatches","description":"Maximum number of successfully filtered messages to obtain","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"WebhookMessageOptions","name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index d051f9f80..12f31cead 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -121,6 +121,7 @@ class TextBasedChannel { /** * Gets a single message from this channel, regardless of it being cached or not. + * Only OAuth bot accounts can use this method. * @param {string} messageID The ID of the message to get * @returns {Promise} * @example From b2eb796cfc528ec8f187ea87e3c65f8a3c7ca104 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 23 Oct 2016 19:59:19 +0100 Subject: [PATCH 129/188] remove console.log and fix endless loop connecting --- src/client/voice/VoiceUDPClient.js | 1 - src/client/voice/VoiceWebSocket.js | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/client/voice/VoiceUDPClient.js b/src/client/voice/VoiceUDPClient.js index 65a6058ef..f59ffbf3c 100644 --- a/src/client/voice/VoiceUDPClient.js +++ b/src/client/voice/VoiceUDPClient.js @@ -84,7 +84,6 @@ class VoiceConnectionUDPClient extends EventEmitter { return new Promise((resolve, reject) => { if (this.socket) { if (!this.discordAddress || !this.discordPort) { - console.log(this); reject(new Error('malformed UDP address or port')); return; } diff --git a/src/client/voice/VoiceWebSocket.js b/src/client/voice/VoiceWebSocket.js index af6a20685..688951c5c 100644 --- a/src/client/voice/VoiceWebSocket.js +++ b/src/client/voice/VoiceWebSocket.js @@ -96,7 +96,6 @@ class VoiceWebSocket extends EventEmitter { * @returns {Promise} */ sendPacket(packet) { - console.log('try send', packet); try { packet = JSON.stringify(packet); } catch (error) { @@ -165,7 +164,6 @@ class VoiceWebSocket extends EventEmitter { * @param {Object} packet the received packet * @event VoiceWebSocket#ready */ - console.log('hi', packet.d); this.emit('ready', packet.d); break; case Constants.VoiceOPCodes.SESSION_DESCRIPTION: @@ -233,7 +231,7 @@ class VoiceWebSocket extends EventEmitter { * Sends a heartbeat packet */ sendHeartbeat() { - this.sendPacket({ op: Constants.VoiceOPCodes.HEARTBEAT }) + this.sendPacket({ op: Constants.VoiceOPCodes.HEARTBEAT, d: null }) .catch(() => { this.emit('warn', 'tried to send heartbeat, but connection is not open'); this.clearHeartbeat(); From 21533eec5b142f3ff166db190477de88a1a70645 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 23 Oct 2016 20:51:04 +0100 Subject: [PATCH 130/188] fix banning probably hopefully --- src/client/rest/RESTMethods.js | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 711c47653..a2bf2800b 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -372,26 +372,27 @@ class RESTMethods { }); } - banGuildMember(guild, member, deleteDays) { + banGuildMember(guild, member, deleteDays = 0) { return new Promise((resolve, reject) => { const id = this.rest.client.resolver.resolveUserID(member); if (!id) throw new Error('Couldn\'t resolve the user ID to ban.'); - this.rest.makeRequest('put', `${Constants.Endpoints.guildBans(guild.id)}/${id}`, true, { - 'delete-message-days': deleteDays, - }).then(() => { - if (member instanceof GuildMember) { - resolve(member); - return; - } - const user = this.rest.client.resolver.resolveUser(id); - if (user) { - member = this.rest.client.resolver.resolveGuildMember(guild, user); - resolve(member || user); - return; - } - resolve(id); - }).catch(reject); + this.rest.makeRequest('put', + `${Constants.Endpoints.guildBans(guild.id)}/${id}?delete-message-days=${deleteDays}`, true, { + 'delete-message-days': deleteDays, + }).then(() => { + if (member instanceof GuildMember) { + resolve(member); + return; + } + const user = this.rest.client.resolver.resolveUser(id); + if (user) { + member = this.rest.client.resolver.resolveGuildMember(guild, user); + resolve(member || user); + return; + } + resolve(id); + }).catch(reject); }); } From a7d16e66b7f992aa661f7b1a7cd951cb5cbeb1d0 Mon Sep 17 00:00:00 2001 From: Evelyne Lachance Date: Mon, 24 Oct 2016 00:50:15 -0400 Subject: [PATCH 131/188] Version bump for indev+troubleshooting --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3fb7ed856..22268e364 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "discord.js", - "version": "9.3.0", + "version": "9.3.2", "description": "A powerful library for interacting with the Discord API", "main": "./src/index", "scripts": { From 44bae385c2d21a9bfac9105bc2ac4fbe5bca4707 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Mon, 24 Oct 2016 00:09:38 -0500 Subject: [PATCH 132/188] update clientUser#setAvatar (#819) * WHO DID THIS * e * some people have base64 fetishes i guess Signed-off-by: Gus Caplan --- docs/docs.json | 2 +- src/structures/ClientUser.js | 14 +++++++++++--- src/structures/Webhook.js | 5 ++--- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 791e9f365..cd5856b44 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1477249129825},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array or collection of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]],[["Collection",".<"],["string",", "],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":23,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"oldEmoji","description":"The old emoji","type":{"types":[[["Emoji",""]]]}},{"name":"newEmoji","description":"The new emoji","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":286,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":161,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":172,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":187,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":8,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":87,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":101,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":110,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":120,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":132,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#addFriend","name":"addFriend","description":"Send a friend request\rThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":142,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to send the friend request to.","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"ClientUser#removeFriend","name":"removeFriend","description":"Remove a friend\rThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":153,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to remove from your friends","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":163,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#block","name":"block","description":"Blocks the user","memberof":"ClientUser","inherits":"User#block","inherited":true,"meta":{"line":158,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"ClientUser#unblock","name":"unblock","description":"Unblocks the user","memberof":"ClientUser","inherits":"User#unblock","inherited":true,"meta":{"line":166,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":176,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":194,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":16,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#friends","name":"friends","description":"A Collection of friends for the logged in user.\rThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":31,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#blocked","name":"blocked","description":"A Collection of blocked users for the logged in user.\rThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":38,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.\rOnly OAuth bot accounts can use this method.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":133,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":165,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":204,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":232,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":300,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":319,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":248,"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":257,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.first();\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.\rOnly OAuth bot accounts can use this method.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":133,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":165,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":204,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":232,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":300,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":319,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":248,"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":257,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":331,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":341,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":350,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":358,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":372,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":393,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":414,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":443,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#type","name":"type","description":"The type of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":107,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":118,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":209,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":218,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":227,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":237,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":276,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":285,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":294,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":305,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":134,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":42,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":48,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":54,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":66,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":83,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":138,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.\rOnly OAuth bot accounts can use this method.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":133,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":165,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":204,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":232,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":300,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":319,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":248,"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":257,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#addFriend","name":"addFriend","description":"Sends a friend request to the user","memberof":"User","meta":{"line":142,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#removeFriend","name":"removeFriend","description":"Removes the user from your friends","memberof":"User","meta":{"line":150,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#block","name":"block","description":"Blocks the user","memberof":"User","meta":{"line":158,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#unblock","name":"unblock","description":"Unblocks the user","memberof":"User","meta":{"line":166,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":176,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":194,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":74,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":87,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":97,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#filterArray","name":"filterArray","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":238,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":253,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":268,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":283,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":295,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":309,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.\rOnly OAuth bot accounts can use this method.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":133,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":165,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":204,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":232,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":300,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":319,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":248,"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":257,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":145,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":280,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMatches","description":"Maximum number of successfully filtered messages to obtain","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"WebhookMessageOptions","name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1477285044501},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array or collection of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]],[["Collection",".<"],["string",", "],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":23,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"oldEmoji","description":"The old emoji","type":{"types":[[["Emoji",""]]]}},{"name":"newEmoji","description":"The new emoji","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":286,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":200,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nIf you do not select an amount of shards, the manager will automatically decide the best amount.\nThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":161,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":172,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":187,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":8,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":87,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar('./avatar.png')\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":101,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["FileResolvable",""]],[["Base64Resolveable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":118,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":128,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":140,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#addFriend","name":"addFriend","description":"Send a friend request\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":150,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to send the friend request to.","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"ClientUser#removeFriend","name":"removeFriend","description":"Remove a friend\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":161,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to remove from your friends","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":171,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#block","name":"block","description":"Blocks the user","memberof":"ClientUser","inherits":"User#block","inherited":true,"meta":{"line":158,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"ClientUser#unblock","name":"unblock","description":"Unblocks the user","memberof":"ClientUser","inherits":"User#unblock","inherited":true,"meta":{"line":166,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":176,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":194,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":16,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#friends","name":"friends","description":"A Collection of friends for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":31,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#blocked","name":"blocked","description":"A Collection of blocked users for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":38,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.\nOnly OAuth bot accounts can use this method.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":133,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":165,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":204,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"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":232,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["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":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the 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":300,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":319,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":248,"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":257,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.first();\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.\nOnly OAuth bot accounts can use this method.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":133,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":165,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":204,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"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":232,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["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":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the 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":300,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":319,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":248,"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":257,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":331,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":341,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":350,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":358,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":372,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":393,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":414,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":443,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#type","name":"type","description":"The type of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":107,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":118,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":209,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":218,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":227,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":237,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":276,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":285,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":294,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":305,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":134,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":42,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":48,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":54,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":66,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":83,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":138,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.\nOnly OAuth bot accounts can use this method.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":133,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":165,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":204,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"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":232,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["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":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the 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":300,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":319,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":248,"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":257,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#addFriend","name":"addFriend","description":"Sends a friend request to the user","memberof":"User","meta":{"line":142,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#removeFriend","name":"removeFriend","description":"Removes the user from your friends","memberof":"User","meta":{"line":150,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#block","name":"block","description":"Blocks the user","memberof":"User","meta":{"line":158,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#unblock","name":"unblock","description":"Unblocks the user","memberof":"User","meta":{"line":166,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":176,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":194,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":74,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":87,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":97,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":200,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#filterArray","name":"filterArray","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":238,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":253,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":268,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":283,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":295,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":309,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.\nOnly OAuth bot accounts can use this method.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":133,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":165,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":204,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":232,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["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":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The 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":300,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":319,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":248,"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":257,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":145,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":280,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMatches","description":"Maximum number of successfully filtered messages to obtain","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"WebhookMessageOptions","name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index eff683887..ab19f5ea7 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -90,16 +90,24 @@ class ClientUser extends User { /** * Set the avatar of the logged in Client. - * @param {Base64Resolvable} avatar The new avatar + * @param {FileResolvable|Base64Resolveable} avatar The new avatar * @returns {Promise} * @example * // set avatar - * client.user.setAvatar(fs.readFileSync('./avatar.png')) + * client.user.setAvatar('./avatar.png') * .then(user => console.log(`New avatar set!`)) * .catch(console.error); */ setAvatar(avatar) { - return this.client.rest.methods.updateCurrentUser({ avatar }); + return new Promise(resolve => { + if (avatar.startsWith('data:')) { + resolve(this.client.rest.methods.updateCurrentUser({ avatar })); + } else { + this.client.resolver.resolveFile(avatar).then(data => { + resolve(this.client.rest.methods.updateCurrentUser({ avatar: data })); + }); + } + }); } /** diff --git a/src/structures/Webhook.js b/src/structures/Webhook.js index 2661b896d..0212bf33d 100644 --- a/src/structures/Webhook.js +++ b/src/structures/Webhook.js @@ -176,12 +176,11 @@ class Webhook { * @param {FileResolvable} avatar The new avatar for the Webhook. * @returns {Promise} */ - edit(name, avatar) { + edit(name = this.name, avatar) { return new Promise((resolve, reject) => { if (avatar) { this.client.resolver.resolveFile(avatar).then(file => { - let base64 = new Buffer(file, 'binary').toString('base64'); - let dataURI = `data:;base64,${base64}`; + const dataURI = this.client.resolver.resolveBase64(file); this.client.rest.methods.editWebhook(this, name, dataURI) .then(resolve).catch(reject); }).catch(reject); From c5c9d0265c2927be30d65113076dca8076e8cf2f Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Mon, 24 Oct 2016 01:10:52 -0400 Subject: [PATCH 133/188] Evie :unamused: --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 22268e364..adcf68483 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "discord.js", - "version": "9.3.2", + "version": "10.0.0", "description": "A powerful library for interacting with the Discord API", "main": "./src/index", "scripts": { From e13e2447d426ab9fe09d4e8a67042afb97a2dc16 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 24 Oct 2016 14:26:24 +0100 Subject: [PATCH 134/188] get voice sort of working --- src/client/voice/ClientVoiceManager.js | 2 +- src/client/voice/VoiceConnection.js | 17 +++++++- src/client/voice/VoiceUDPClient.js | 1 + src/client/voice/VoiceWebSocket.js | 1 + .../voice/dispatcher/StreamDispatcher.js | 15 +++---- src/client/voice/pcm/FfmpegConverterEngine.js | 16 ++++++-- src/client/voice/player/AudioPlayer.js | 41 +++++++++++++++++++ test/random.js | 3 +- 8 files changed, 81 insertions(+), 15 deletions(-) create mode 100644 src/client/voice/player/AudioPlayer.js diff --git a/src/client/voice/ClientVoiceManager.js b/src/client/voice/ClientVoiceManager.js index cbc88feb5..1808bfe75 100644 --- a/src/client/voice/ClientVoiceManager.js +++ b/src/client/voice/ClientVoiceManager.js @@ -241,7 +241,7 @@ class ClientVoiceManager { pendingConnection.on('pass', voiceConnection => { this.pending.delete(channel.guild.id); this.connections.set(channel.guild.id, voiceConnection); - voiceConnection.once('ready', resolve); + voiceConnection.once('ready', () => resolve(voiceConnection)); voiceConnection.once('error', reject); }); }); diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index 82b4d86e0..0e37e4e10 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -2,8 +2,8 @@ const VoiceWebSocket = require('./VoiceWebSocket'); const VoiceUDP = require('./VoiceUDPClient'); const VoiceReceiver = require('./receiver/VoiceReceiver'); const Constants = require('../../util/Constants'); +const AudioPlayer = require('./player/AudioPlayer'); const EventEmitter = require('events').EventEmitter; -const DefaultPlayer = require('./player/DefaultPlayer'); /** * Represents a connection to a Voice Channel in Discord. @@ -37,6 +37,8 @@ class VoiceConnection extends EventEmitter { */ this.authentication = pendingConnection.data; + this.player = new AudioPlayer(this); + /** * Object that wraps contains the `ws` and `udp` sockets of this voice connection * @type {object} @@ -45,6 +47,18 @@ class VoiceConnection extends EventEmitter { this.connect(); } + setSpeaking(value) { + if (this.speaking === value) return; + this.speaking = value; + this.sockets.ws.sendPacket({ + op: Constants.VoiceOPCodes.SPEAKING, + d: { + speaking: true, + delay: 0, + }, + }); + } + connect() { if (this.sockets.ws) { throw new Error('There is already an existing WebSocket connection!'); @@ -58,6 +72,7 @@ class VoiceConnection extends EventEmitter { this.sockets.udp.on('error', e => this.emit('error', e)); this.sockets.ws.once('ready', d => { this.authentication.port = d.port; + this.authentication.ssrc = d.ssrc; this.sockets.udp.findEndpointAddress() .then(address => { this.sockets.udp.createUDPSocket(address); diff --git a/src/client/voice/VoiceUDPClient.js b/src/client/voice/VoiceUDPClient.js index f59ffbf3c..9ae701f40 100644 --- a/src/client/voice/VoiceUDPClient.js +++ b/src/client/voice/VoiceUDPClient.js @@ -87,6 +87,7 @@ class VoiceConnectionUDPClient extends EventEmitter { reject(new Error('malformed UDP address or port')); return; } + // console.log('sendin', packet); this.socket.send(packet, 0, packet.length, this.discordPort, this.discordAddress, error => { if (error) { reject(error); diff --git a/src/client/voice/VoiceWebSocket.js b/src/client/voice/VoiceWebSocket.js index 688951c5c..e2d13be16 100644 --- a/src/client/voice/VoiceWebSocket.js +++ b/src/client/voice/VoiceWebSocket.js @@ -77,6 +77,7 @@ class VoiceWebSocket extends EventEmitter { send(data) { return new Promise((resolve, reject) => { if (this.ws.readyState === WebSocket.OPEN) { + console.log('sending', data); this.ws.send(data, null, error => { if (error) { reject(error); diff --git a/src/client/voice/dispatcher/StreamDispatcher.js b/src/client/voice/dispatcher/StreamDispatcher.js index fa23a364e..20846b91a 100644 --- a/src/client/voice/dispatcher/StreamDispatcher.js +++ b/src/client/voice/dispatcher/StreamDispatcher.js @@ -132,7 +132,7 @@ class StreamDispatcher extends EventEmitter { _sendBuffer(buffer, sequence, timestamp) { let repeats = this.passes; const packet = this._createPacket(sequence, timestamp, this.player.opusEncoder.encode(buffer)); - while (repeats--) this.player.connection.udp.send(packet); + while (repeats--) this.player.voiceConnection.sockets.udp.send(packet); } _createPacket(sequence, timestamp, buffer) { @@ -143,10 +143,10 @@ class StreamDispatcher extends EventEmitter { packetBuffer.writeUIntBE(sequence, 2, 2); packetBuffer.writeUIntBE(timestamp, 4, 4); - packetBuffer.writeUIntBE(this.player.connection.data.ssrc, 8, 4); + packetBuffer.writeUIntBE(this.player.voiceConnection.authentication.ssrc, 8, 4); packetBuffer.copy(nonce, 0, 0, 12); - buffer = NaCl.secretbox(buffer, nonce, this.player.connection.data.secret); + buffer = NaCl.secretbox(buffer, nonce, this.player.voiceConnection.authentication.secretKey.key); for (let i = 0; i < buffer.length; i++) packetBuffer[i + 12] = buffer[i]; @@ -183,7 +183,7 @@ class StreamDispatcher extends EventEmitter { if (this.paused) { // data.timestamp = data.timestamp + 4294967295 ? data.timestamp + 960 : 0; data.pausedTime += data.length * 10; - this.player.connection.manager.client.setTimeout(() => this._send(), data.length * 10); + this.player.voiceConnection.voiceManager.client.setTimeout(() => this._send(), data.length * 10); return; } @@ -203,7 +203,7 @@ class StreamDispatcher extends EventEmitter { if (!buffer) { data.missed++; data.pausedTime += data.length * 10; - this.player.connection.manager.client.setTimeout(() => this._send(), data.length * 10); + this.player.voiceConnection.voiceManager.client.setTimeout(() => this._send(), data.length * 10); return; } @@ -224,7 +224,8 @@ class StreamDispatcher extends EventEmitter { this._sendBuffer(buffer, data.sequence, data.timestamp); const nextTime = data.length + (data.startTime + data.pausedTime + (data.count * data.length) - Date.now()); - this.player.connection.manager.client.setTimeout(() => this._send(), nextTime); + console.log('again! in', nextTime); + this.player.voiceConnection.voiceManager.client.setTimeout(() => this._send(), nextTime); } catch (e) { this._triggerTerminalState('error', e); } @@ -250,7 +251,7 @@ class StreamDispatcher extends EventEmitter { _triggerTerminalState(state, err) { if (this._triggered) return; - + console.log(state, err); /** * Emitted when the stream wants to give debug information. * @event StreamDispatcher#debug diff --git a/src/client/voice/pcm/FfmpegConverterEngine.js b/src/client/voice/pcm/FfmpegConverterEngine.js index e1f39d029..21d0449c3 100644 --- a/src/client/voice/pcm/FfmpegConverterEngine.js +++ b/src/client/voice/pcm/FfmpegConverterEngine.js @@ -1,5 +1,16 @@ const ConverterEngine = require('./ConverterEngine'); const ChildProcess = require('child_process'); +const EventEmitter = require('events').EventEmitter; + +class PCMConversionProcess extends EventEmitter { + + constructor(process) { + super(); + this.process = process; + this.process.on('error', e => this.emit('error', e)); + } + +} class FfmpegConverterEngine extends ConverterEngine { constructor(player) { @@ -24,10 +35,7 @@ class FfmpegConverterEngine extends ConverterEngine { '-ss', String(seek), 'pipe:1', ], { stdio: ['pipe', 'pipe', 'ignore'] }); - 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; + return new PCMConversionProcess(encoder); } } diff --git a/src/client/voice/player/AudioPlayer.js b/src/client/voice/player/AudioPlayer.js new file mode 100644 index 000000000..baef5acf4 --- /dev/null +++ b/src/client/voice/player/AudioPlayer.js @@ -0,0 +1,41 @@ +const PCMConverters = require('../pcm/ConverterEngineList'); +const OpusEncoders = require('../opus/OpusEngineList'); +const EventEmitter = require('events').EventEmitter; +const StreamDispatcher = require('../dispatcher/StreamDispatcher'); + +class AudioPlayer extends EventEmitter { + + constructor(voiceConnection) { + super(); + this.voiceConnection = voiceConnection; + this.audioToPCM = new (PCMConverters.fetch())(); + this.opusEncoder = OpusEncoders.fetch(); + + this.audioToPCM.on('error', e => this.emit('error', e)); + } + + playUnknownStream(stream) { + const conversionProcess = this.audioToPCM.createConvertStream(0); + stream.pipe(conversionProcess.process.stdin, { end: false }); + return this.playPCMStream(conversionProcess.process.stdout); + } + + playPCMStream(stream) { + stream.on('error', e => this.emit('error', e)); + const dispatcher = new StreamDispatcher(this, stream, { + channels: 2, + count: 0, + sequence: 0, + timestamp: 0, + pausedTime: 0, + }, { + volume: 1, + }); + dispatcher.on('error', e => console.log('error', e)); + dispatcher.on('end', e => console.log('end', e)); + dispatcher.on('speaking', value => this.voiceConnection.setSpeaking(value)); + } + +} + +module.exports = AudioPlayer; diff --git a/test/random.js b/test/random.js index 9ad71b3a4..1d2773959 100644 --- a/test/random.js +++ b/test/random.js @@ -168,10 +168,9 @@ client.on('message', msg => { .then(conn => { con = conn; msg.reply('done'); - disp = conn.player.playStream(ytdl('https://www.youtube.com/watch?v=oQBiPwklN_Q', {filter : 'audioonly'}), { passes : 3 }); + disp = conn.player.playUnknownStream(fs.createReadStream('C:/Users/Amish/Desktop/04 Out of the Woods.m4a'), { passes : 3 }); 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.error); } From 8dd2005ab9e86483e8b3b4e63c95276130a47b01 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 24 Oct 2016 14:37:08 +0100 Subject: [PATCH 135/188] stop logging --- src/client/voice/dispatcher/StreamDispatcher.js | 1 - test/random.js | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/client/voice/dispatcher/StreamDispatcher.js b/src/client/voice/dispatcher/StreamDispatcher.js index 20846b91a..4ad6998fe 100644 --- a/src/client/voice/dispatcher/StreamDispatcher.js +++ b/src/client/voice/dispatcher/StreamDispatcher.js @@ -224,7 +224,6 @@ class StreamDispatcher extends EventEmitter { this._sendBuffer(buffer, data.sequence, data.timestamp); const nextTime = data.length + (data.startTime + data.pausedTime + (data.count * data.length) - Date.now()); - console.log('again! in', nextTime); this.player.voiceConnection.voiceManager.client.setTimeout(() => this._send(), nextTime); } catch (e) { this._triggerTerminalState('error', e); diff --git a/test/random.js b/test/random.js index 1d2773959..806748161 100644 --- a/test/random.js +++ b/test/random.js @@ -6,7 +6,7 @@ const fs = require('fs'); const client = new Discord.Client({ fetchAllMembers: false, apiRequestMethod: 'sequential' }); -const { email, password, token, usertoken } = require('./auth.json'); +const { email, password, token, usertoken, song } = require('./auth.json'); client.login(token).then(atoken => console.log('logged in with token ' + atoken)).catch(console.error); @@ -168,7 +168,7 @@ client.on('message', msg => { .then(conn => { con = conn; msg.reply('done'); - disp = conn.player.playUnknownStream(fs.createReadStream('C:/Users/Amish/Desktop/04 Out of the Woods.m4a'), { passes : 3 }); + disp = conn.player.playUnknownStream(ytdl(song, {filter:'audioonly'}), { passes : 3 }); conn.player.on('debug', console.log); conn.player.on('error', err => console.log(123, err)); }) From 9d0dd665de33821ca085b9ef91962cd95bcfd11d Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 24 Oct 2016 14:49:01 +0100 Subject: [PATCH 136/188] fix something --- test/random.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/random.js b/test/random.js index 806748161..9fceaf172 100644 --- a/test/random.js +++ b/test/random.js @@ -160,7 +160,7 @@ let disp, con; client.on('message', msg => { if (msg.content.startsWith('/play')) { const chan = msg.content.split(' ').slice(1).join(' '); - con.playStream(ytdl(chan, {filter : 'audioonly'}), { passes : 4 }); + con.player.playUnknownStream(ytdl(chan, {filter : 'audioonly'}), { passes : 4 }); } if (msg.content.startsWith('/join')) { const chan = msg.content.split(' ').slice(1).join(' '); From d42ac98339ded93a366deb15d9e7f10150c419e9 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 24 Oct 2016 15:47:31 +0100 Subject: [PATCH 137/188] Fix #775 (permission overwrites not taking into account previous values) --- src/structures/GuildChannel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index de1cd2726..7d220cf6c 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -144,8 +144,8 @@ class GuildChannel extends Channel { const prevOverwrite = this.permissionOverwrites.get(userOrRole.id); if (prevOverwrite) { - payload.allow = prevOverwrite.allow; - payload.deny = prevOverwrite.deny; + payload.allow = prevOverwrite.allowData; + payload.deny = prevOverwrite.denyData; } for (const perm in options) { From 6093dac5544781e29f259f281fbb44629b5ff5a0 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 24 Oct 2016 15:57:07 +0100 Subject: [PATCH 138/188] Fix #776 (guildMemberAdd firing for existing members) --- src/structures/Guild.js | 3 ++- test/random.js | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/structures/Guild.js b/src/structures/Guild.js index d8dae531f..7c7fcd4a9 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -679,6 +679,7 @@ class Guild { } _addMember(guildUser, emitEvent = true) { + const existing = this.members.has(guildUser.user.id); if (!(guildUser.user instanceof User)) guildUser.user = this.client.dataManager.newUser(guildUser.user); guildUser.joined_at = guildUser.joined_at || 0; @@ -702,7 +703,7 @@ class Guild { * @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 && emitEvent) { + if (this.client.ws.status === Constants.Status.READY && emitEvent && !existing) { this.client.emit(Constants.Events.GUILD_MEMBER_ADD, this, member); } diff --git a/test/random.js b/test/random.js index 9ad71b3a4..27db94d86 100644 --- a/test/random.js +++ b/test/random.js @@ -20,6 +20,8 @@ client.on('userUpdate', (o, n) => { console.log(o.username, n.username); }); +client.on('guildMemberAdd', (g, m) => console.log(`${m.user.username} joined ${g.name}`)); + client.on('channelCreate', channel => { console.log(`made ${channel.name}`); }); From c6d0c31c842acded9a89f0ea54a09a301cc69762 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 24 Oct 2016 17:10:17 +0100 Subject: [PATCH 139/188] hydra have you actually fixed voice whatttt --- .../voice/dispatcher/StreamDispatcher.js | 2 +- src/client/voice/player/AudioPlayer.js | 51 +++++++++++++------ 2 files changed, 37 insertions(+), 16 deletions(-) diff --git a/src/client/voice/dispatcher/StreamDispatcher.js b/src/client/voice/dispatcher/StreamDispatcher.js index 4ad6998fe..068ff4104 100644 --- a/src/client/voice/dispatcher/StreamDispatcher.js +++ b/src/client/voice/dispatcher/StreamDispatcher.js @@ -38,7 +38,7 @@ class StreamDispatcher extends EventEmitter { * aren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime. * @type {number} */ - this.passes = streamOptions.passes || 1; + this.passes = streamOptions.passes || 3; /** * Whether playing is paused diff --git a/src/client/voice/player/AudioPlayer.js b/src/client/voice/player/AudioPlayer.js index baef5acf4..73958c317 100644 --- a/src/client/voice/player/AudioPlayer.js +++ b/src/client/voice/player/AudioPlayer.js @@ -10,30 +10,51 @@ class AudioPlayer extends EventEmitter { this.voiceConnection = voiceConnection; this.audioToPCM = new (PCMConverters.fetch())(); this.opusEncoder = OpusEncoders.fetch(); - + this.currentConverter = null; + this.currentDispatcher = null; this.audioToPCM.on('error', e => this.emit('error', e)); - } - - playUnknownStream(stream) { - const conversionProcess = this.audioToPCM.createConvertStream(0); - stream.pipe(conversionProcess.process.stdin, { end: false }); - return this.playPCMStream(conversionProcess.process.stdout); - } - - playPCMStream(stream) { - stream.on('error', e => this.emit('error', e)); - const dispatcher = new StreamDispatcher(this, stream, { + this.streamingData = { channels: 2, count: 0, sequence: 0, timestamp: 0, pausedTime: 0, - }, { + }; + } + + playUnknownStream(stream) { + const conversionProcess = this.audioToPCM.createConvertStream(0); + stream.pipe(conversionProcess.process.stdin, { end: false }); + return this.playPCMStream(conversionProcess.process.stdout, conversionProcess); + } + + cleanup(checkStream) { + const filter = checkStream && this.currentDispatcher && this.currentDispatcher.stream === checkStream; + if (this.currentConverter && (checkStream ? filter : true)) { + if (this.currentConverter.process.stdin.destroy) { + this.currentConverter.process.stdin.destroy(); + } + if (this.currentConverter.process.kill) { + this.currentConverter.process.kill(); + } + this.currentConverter = null; + } + } + + playPCMStream(stream, converter) { + this.cleanup(); + this.currentConverter = converter; + if (this.currentDispatcher) { + this.streamingData = this.currentDispatcher.streamingData; + } + stream.on('error', e => this.emit('error', e)); + const dispatcher = new StreamDispatcher(this, stream, this.streamingData, { volume: 1, }); - dispatcher.on('error', e => console.log('error', e)); - dispatcher.on('end', e => console.log('end', e)); + dispatcher.on('error', e => this.emit('error', e)); + dispatcher.on('end', () => this.cleanup(dispatcher.stream)); dispatcher.on('speaking', value => this.voiceConnection.setSpeaking(value)); + this.currentDispatcher = dispatcher; } } From 17586f0e206ee89c46ff00efe208d9adfb3f99f1 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 24 Oct 2016 17:41:37 +0100 Subject: [PATCH 140/188] maybe fix again --- src/client/voice/VoiceConnection.js | 5 +++++ src/client/voice/player/AudioPlayer.js | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index 0e37e4e10..54ab5707c 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -39,6 +39,11 @@ class VoiceConnection extends EventEmitter { this.player = new AudioPlayer(this); + this.player.on('error', e => { + this.emit('warn', e); + this.player.cleanup(); + }); + /** * Object that wraps contains the `ws` and `udp` sockets of this voice connection * @type {object} diff --git a/src/client/voice/player/AudioPlayer.js b/src/client/voice/player/AudioPlayer.js index 73958c317..049aad659 100644 --- a/src/client/voice/player/AudioPlayer.js +++ b/src/client/voice/player/AudioPlayer.js @@ -23,12 +23,18 @@ class AudioPlayer extends EventEmitter { } playUnknownStream(stream) { + stream.on('end', () => { + + console.log(Date.now(), 'real input stream ended'); + }) const conversionProcess = this.audioToPCM.createConvertStream(0); stream.pipe(conversionProcess.process.stdin, { end: false }); return this.playPCMStream(conversionProcess.process.stdout, conversionProcess); } cleanup(checkStream) { + // cleanup is a lot less aggressive than v9 because it doesn't try to kill every single stream it is aware of + console.log(Date.now(), 'clean up triggered'); const filter = checkStream && this.currentDispatcher && this.currentDispatcher.stream === checkStream; if (this.currentConverter && (checkStream ? filter : true)) { if (this.currentConverter.process.stdin.destroy) { @@ -42,6 +48,10 @@ class AudioPlayer extends EventEmitter { } playPCMStream(stream, converter) { + stream.on('end', () => { + + console.log(Date.now(), 'pcm input stream ended'); + }) this.cleanup(); this.currentConverter = converter; if (this.currentDispatcher) { From 7818d37042152a42df73e0970189cab01da261b9 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 24 Oct 2016 18:36:52 +0100 Subject: [PATCH 141/188] catch cleanup reasons --- src/client/voice/player/AudioPlayer.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client/voice/player/AudioPlayer.js b/src/client/voice/player/AudioPlayer.js index 049aad659..db8d2bcd2 100644 --- a/src/client/voice/player/AudioPlayer.js +++ b/src/client/voice/player/AudioPlayer.js @@ -32,7 +32,7 @@ class AudioPlayer extends EventEmitter { return this.playPCMStream(conversionProcess.process.stdout, conversionProcess); } - cleanup(checkStream) { + cleanup(checkStream, reason) { // cleanup is a lot less aggressive than v9 because it doesn't try to kill every single stream it is aware of console.log(Date.now(), 'clean up triggered'); const filter = checkStream && this.currentDispatcher && this.currentDispatcher.stream === checkStream; @@ -52,7 +52,7 @@ class AudioPlayer extends EventEmitter { console.log(Date.now(), 'pcm input stream ended'); }) - this.cleanup(); + this.cleanup(null, 'outstanding play stream'); this.currentConverter = converter; if (this.currentDispatcher) { this.streamingData = this.currentDispatcher.streamingData; @@ -62,7 +62,7 @@ class AudioPlayer extends EventEmitter { volume: 1, }); dispatcher.on('error', e => this.emit('error', e)); - dispatcher.on('end', () => this.cleanup(dispatcher.stream)); + dispatcher.on('end', () => this.cleanup(dispatcher.stream, 'disp ended')); dispatcher.on('speaking', value => this.voiceConnection.setSpeaking(value)); this.currentDispatcher = dispatcher; } From 5749eb6bb06c5a0bae63a3b4b7f6246cf0430f02 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 24 Oct 2016 18:56:02 +0100 Subject: [PATCH 142/188] actually log the damn reason --- src/client/voice/player/AudioPlayer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/voice/player/AudioPlayer.js b/src/client/voice/player/AudioPlayer.js index db8d2bcd2..bb0494450 100644 --- a/src/client/voice/player/AudioPlayer.js +++ b/src/client/voice/player/AudioPlayer.js @@ -34,7 +34,7 @@ class AudioPlayer extends EventEmitter { cleanup(checkStream, reason) { // cleanup is a lot less aggressive than v9 because it doesn't try to kill every single stream it is aware of - console.log(Date.now(), 'clean up triggered'); + console.log(Date.now(), 'clean up triggered due to', reason); const filter = checkStream && this.currentDispatcher && this.currentDispatcher.stream === checkStream; if (this.currentConverter && (checkStream ? filter : true)) { if (this.currentConverter.process.stdin.destroy) { From 1a5ce878a18ba25383695831d8a4e9c7d6ccf4b6 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 24 Oct 2016 20:13:44 +0100 Subject: [PATCH 143/188] fix some stuff --- src/client/voice/VoiceConnection.js | 1 + src/client/voice/VoiceWebSocket.js | 1 - .../voice/dispatcher/StreamDispatcher.js | 2 +- src/client/voice/pcm/FfmpegConverterEngine.js | 27 +++++++++++++++++++ src/client/voice/player/AudioPlayer.js | 13 ++++----- test/random.js | 1 - 6 files changed, 34 insertions(+), 11 deletions(-) diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index 54ab5707c..5dbd9c4e4 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -41,6 +41,7 @@ class VoiceConnection extends EventEmitter { this.player.on('error', e => { this.emit('warn', e); + console.log('so yeah uh'+e); this.player.cleanup(); }); diff --git a/src/client/voice/VoiceWebSocket.js b/src/client/voice/VoiceWebSocket.js index e2d13be16..688951c5c 100644 --- a/src/client/voice/VoiceWebSocket.js +++ b/src/client/voice/VoiceWebSocket.js @@ -77,7 +77,6 @@ class VoiceWebSocket extends EventEmitter { send(data) { return new Promise((resolve, reject) => { if (this.ws.readyState === WebSocket.OPEN) { - console.log('sending', data); this.ws.send(data, null, error => { if (error) { reject(error); diff --git a/src/client/voice/dispatcher/StreamDispatcher.js b/src/client/voice/dispatcher/StreamDispatcher.js index 068ff4104..47832e1ae 100644 --- a/src/client/voice/dispatcher/StreamDispatcher.js +++ b/src/client/voice/dispatcher/StreamDispatcher.js @@ -132,7 +132,7 @@ class StreamDispatcher extends EventEmitter { _sendBuffer(buffer, sequence, timestamp) { let repeats = this.passes; const packet = this._createPacket(sequence, timestamp, this.player.opusEncoder.encode(buffer)); - while (repeats--) this.player.voiceConnection.sockets.udp.send(packet); + while (repeats--) this.player.voiceConnection.sockets.udp.send(packet).catch(e => console.log('so uhhh', e)); } _createPacket(sequence, timestamp, buffer) { diff --git a/src/client/voice/pcm/FfmpegConverterEngine.js b/src/client/voice/pcm/FfmpegConverterEngine.js index 21d0449c3..2d54ac23e 100644 --- a/src/client/voice/pcm/FfmpegConverterEngine.js +++ b/src/client/voice/pcm/FfmpegConverterEngine.js @@ -7,9 +7,36 @@ class PCMConversionProcess extends EventEmitter { constructor(process) { super(); this.process = process; + this.input = null; this.process.on('error', e => this.emit('error', e)); } + setInput(stream) { + this.input = stream; + stream.pipe(this.process.stdin, { end: false }); + this.input.on('error', e => this.emit('error', e)); + } + + destroy() { + this.emit('debug', 'destroying a ffmpeg process:'); + if (this.input && this.input.unpipe && this.process.stdin) { + this.input.unpipe(this.process.stdin); + this.emit('unpiped the user input stream from the process input stream'); + } + if (this.process.stdin) { + this.process.stdin.end(); + this.emit('ended the process stdin'); + } + if (this.process.stdin.destroy) { + this.process.stdin.destroy(); + this.emit('destroyed the process stdin'); + } + if (this.process.kill) { + this.process.kill(); + this.emit('killed the process'); + } + } + } class FfmpegConverterEngine extends ConverterEngine { diff --git a/src/client/voice/player/AudioPlayer.js b/src/client/voice/player/AudioPlayer.js index bb0494450..c518f307f 100644 --- a/src/client/voice/player/AudioPlayer.js +++ b/src/client/voice/player/AudioPlayer.js @@ -26,9 +26,10 @@ class AudioPlayer extends EventEmitter { stream.on('end', () => { console.log(Date.now(), 'real input stream ended'); - }) + }); + stream.on('error', e => this.emit('error', e)); const conversionProcess = this.audioToPCM.createConvertStream(0); - stream.pipe(conversionProcess.process.stdin, { end: false }); + conversionProcess.setInput(stream); return this.playPCMStream(conversionProcess.process.stdout, conversionProcess); } @@ -37,12 +38,7 @@ class AudioPlayer extends EventEmitter { console.log(Date.now(), 'clean up triggered due to', reason); const filter = checkStream && this.currentDispatcher && this.currentDispatcher.stream === checkStream; if (this.currentConverter && (checkStream ? filter : true)) { - if (this.currentConverter.process.stdin.destroy) { - this.currentConverter.process.stdin.destroy(); - } - if (this.currentConverter.process.kill) { - this.currentConverter.process.kill(); - } + this.currentConverter.destroy(); this.currentConverter = null; } } @@ -65,6 +61,7 @@ class AudioPlayer extends EventEmitter { dispatcher.on('end', () => this.cleanup(dispatcher.stream, 'disp ended')); dispatcher.on('speaking', value => this.voiceConnection.setSpeaking(value)); this.currentDispatcher = dispatcher; + return dispatcher; } } diff --git a/test/random.js b/test/random.js index 32adab2d8..b7ec51d11 100644 --- a/test/random.js +++ b/test/random.js @@ -26,7 +26,6 @@ client.on('channelCreate', channel => { console.log(`made ${channel.name}`); }); -client.on('debug', m => console.log('debug', m)); client.on('error', m => console.log('debug', m)); client.on('reconnecting', m => console.log('debug', m)); From f96c185d92c3acaf76837d601b1590537b2e767c Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 24 Oct 2016 21:39:32 +0100 Subject: [PATCH 144/188] add the functions to voice connection --- src/client/voice/VoiceConnection.js | 15 ++++++++++++++- src/client/voice/pcm/FfmpegConverterEngine.js | 1 + test/random.js | 4 ++-- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index 5dbd9c4e4..1cf80126d 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -4,6 +4,7 @@ const VoiceReceiver = require('./receiver/VoiceReceiver'); const Constants = require('../../util/Constants'); const AudioPlayer = require('./player/AudioPlayer'); const EventEmitter = require('events').EventEmitter; +const fs = require('fs'); /** * Represents a connection to a Voice Channel in Discord. @@ -41,7 +42,7 @@ class VoiceConnection extends EventEmitter { this.player.on('error', e => { this.emit('warn', e); - console.log('so yeah uh'+e); + console.log('so yeah uh' + e); this.player.cleanup(); }); @@ -92,6 +93,18 @@ class VoiceConnection extends EventEmitter { }); } + playFile(file) { + return this.playStream(fs.createReadStream(file)); + } + + playStream(stream) { + return this.player.playUnknownStream(stream); + } + + playConvertedStream(stream) { + return this.player.playPCMStream(stream); + } + } module.exports = VoiceConnection; diff --git a/src/client/voice/pcm/FfmpegConverterEngine.js b/src/client/voice/pcm/FfmpegConverterEngine.js index 2d54ac23e..0e3d8b1c4 100644 --- a/src/client/voice/pcm/FfmpegConverterEngine.js +++ b/src/client/voice/pcm/FfmpegConverterEngine.js @@ -1,6 +1,7 @@ const ConverterEngine = require('./ConverterEngine'); const ChildProcess = require('child_process'); const EventEmitter = require('events').EventEmitter; +require('longjohn'); class PCMConversionProcess extends EventEmitter { diff --git a/test/random.js b/test/random.js index b7ec51d11..2121c5775 100644 --- a/test/random.js +++ b/test/random.js @@ -161,7 +161,7 @@ let disp, con; client.on('message', msg => { if (msg.content.startsWith('/play')) { const chan = msg.content.split(' ').slice(1).join(' '); - con.player.playUnknownStream(ytdl(chan, {filter : 'audioonly'}), { passes : 4 }); + con.playStream(ytdl(chan, {filter : 'audioonly'}), { passes : 4 }); } if (msg.content.startsWith('/join')) { const chan = msg.content.split(' ').slice(1).join(' '); @@ -169,7 +169,7 @@ client.on('message', msg => { .then(conn => { con = conn; msg.reply('done'); - disp = conn.player.playUnknownStream(ytdl(song, {filter:'audioonly'}), { passes : 3 }); + disp = conn.playStream(ytdl(song, {filter:'audioonly'}), { passes : 3 }); conn.player.on('debug', console.log); conn.player.on('error', err => console.log(123, err)); }) From d73d6a7340a23020be53df6bd7e373c5a3f37bf3 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 24 Oct 2016 22:26:34 +0100 Subject: [PATCH 145/188] make some stuffs --- src/client/voice/VoiceConnection.js | 14 +++++++----- .../voice/dispatcher/StreamDispatcher.js | 4 +++- src/client/voice/player/AudioPlayer.js | 22 +++++++++---------- 3 files changed, 21 insertions(+), 19 deletions(-) diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index 1cf80126d..a367718d3 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -93,16 +93,18 @@ class VoiceConnection extends EventEmitter { }); } - playFile(file) { - return this.playStream(fs.createReadStream(file)); + playFile(file, options) { + return this.playStream(fs.createReadStream(file), options); } - playStream(stream) { - return this.player.playUnknownStream(stream); + playStream(stream, { seek = 0, volume = 1, passes = 1 } = {}) { + const options = { seek, volume, passes }; + return this.player.playUnknownStream(stream, options); } - playConvertedStream(stream) { - return this.player.playPCMStream(stream); + playConvertedStream(stream, { seek = 0, volume = 1, passes = 1 } = {}) { + const options = { seek, volume, passes }; + return this.player.playPCMStream(stream, options); } } diff --git a/src/client/voice/dispatcher/StreamDispatcher.js b/src/client/voice/dispatcher/StreamDispatcher.js index 47832e1ae..63d335e4a 100644 --- a/src/client/voice/dispatcher/StreamDispatcher.js +++ b/src/client/voice/dispatcher/StreamDispatcher.js @@ -38,13 +38,15 @@ class StreamDispatcher extends EventEmitter { * aren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime. * @type {number} */ - this.passes = streamOptions.passes || 3; + this.passes = streamOptions.passes || 1; /** * Whether playing is paused * @type {boolean} */ this.paused = false; + + this.setVolume(streamOptions.volume || 1); } /** diff --git a/src/client/voice/player/AudioPlayer.js b/src/client/voice/player/AudioPlayer.js index c518f307f..686bb4ca7 100644 --- a/src/client/voice/player/AudioPlayer.js +++ b/src/client/voice/player/AudioPlayer.js @@ -22,15 +22,15 @@ class AudioPlayer extends EventEmitter { }; } - playUnknownStream(stream) { + playUnknownStream(stream, { seek = 0, volume = 1, passes = 1 } = {}) { + const options = { seek, volume, passes }; stream.on('end', () => { - - console.log(Date.now(), 'real input stream ended'); + console.log(Date.now(), 'real input stream ended'); }); stream.on('error', e => this.emit('error', e)); - const conversionProcess = this.audioToPCM.createConvertStream(0); + const conversionProcess = this.audioToPCM.createConvertStream(options.seek); conversionProcess.setInput(stream); - return this.playPCMStream(conversionProcess.process.stdout, conversionProcess); + return this.playPCMStream(conversionProcess.process.stdout, conversionProcess, options); } cleanup(checkStream, reason) { @@ -43,20 +43,18 @@ class AudioPlayer extends EventEmitter { } } - playPCMStream(stream, converter) { + playPCMStream(stream, converter, { seek = 0, volume = 1, passes = 1 } = {}) { + const options = { seek, volume, passes }; stream.on('end', () => { - - console.log(Date.now(), 'pcm input stream ended'); - }) + console.log(Date.now(), 'pcm input stream ended'); + }); this.cleanup(null, 'outstanding play stream'); this.currentConverter = converter; if (this.currentDispatcher) { this.streamingData = this.currentDispatcher.streamingData; } stream.on('error', e => this.emit('error', e)); - const dispatcher = new StreamDispatcher(this, stream, this.streamingData, { - volume: 1, - }); + const dispatcher = new StreamDispatcher(this, stream, this.streamingData, options); dispatcher.on('error', e => this.emit('error', e)); dispatcher.on('end', () => this.cleanup(dispatcher.stream, 'disp ended')); dispatcher.on('speaking', value => this.voiceConnection.setSpeaking(value)); From 8a68fea9af2db1d7b1ca93938ab22e7c8ab45aa4 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 24 Oct 2016 22:27:03 +0100 Subject: [PATCH 146/188] damn it hydar --- src/client/voice/VoiceConnection.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index a367718d3..7c7b7a269 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -93,7 +93,8 @@ class VoiceConnection extends EventEmitter { }); } - playFile(file, options) { + playFile(file, { seek = 0, volume = 1, passes = 1 } = {}) { + const options = { seek, volume, passes }; return this.playStream(fs.createReadStream(file), options); } From 823a339c25b936d4368d9a80893edc3b2c09afb0 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 24 Oct 2016 22:27:23 +0100 Subject: [PATCH 147/188] oh no wait i was right the first time --- src/client/voice/VoiceConnection.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index 7c7b7a269..a367718d3 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -93,8 +93,7 @@ class VoiceConnection extends EventEmitter { }); } - playFile(file, { seek = 0, volume = 1, passes = 1 } = {}) { - const options = { seek, volume, passes }; + playFile(file, options) { return this.playStream(fs.createReadStream(file), options); } From b0921ae0ef21440831a730f4d7126f1a020c64a5 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 25 Oct 2016 12:52:07 +0100 Subject: [PATCH 148/188] fix econnreset! \o/ #694 --- src/client/voice/pcm/FfmpegConverterEngine.js | 1 + src/client/voice/player/AudioPlayer.js | 1 + 2 files changed, 2 insertions(+) diff --git a/src/client/voice/pcm/FfmpegConverterEngine.js b/src/client/voice/pcm/FfmpegConverterEngine.js index 0e3d8b1c4..e37db8364 100644 --- a/src/client/voice/pcm/FfmpegConverterEngine.js +++ b/src/client/voice/pcm/FfmpegConverterEngine.js @@ -16,6 +16,7 @@ class PCMConversionProcess extends EventEmitter { this.input = stream; stream.pipe(this.process.stdin, { end: false }); this.input.on('error', e => this.emit('error', e)); + this.process.stdin.on('error', e => this.emit('error', e)); } destroy() { diff --git a/src/client/voice/player/AudioPlayer.js b/src/client/voice/player/AudioPlayer.js index 686bb4ca7..0774bfe14 100644 --- a/src/client/voice/player/AudioPlayer.js +++ b/src/client/voice/player/AudioPlayer.js @@ -29,6 +29,7 @@ class AudioPlayer extends EventEmitter { }); stream.on('error', e => this.emit('error', e)); const conversionProcess = this.audioToPCM.createConvertStream(options.seek); + conversionProcess.on('error', e => this.emit('error', e)); conversionProcess.setInput(stream); return this.playPCMStream(conversionProcess.process.stdout, conversionProcess, options); } From 91ba59c43d73e96ce655ffbdc834073a8c261e99 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 25 Oct 2016 14:18:20 +0100 Subject: [PATCH 149/188] Added voice disconnect --- src/client/voice/ClientVoiceManager.js | 1 + src/client/voice/VoiceConnection.js | 18 +++++++++++++++++- src/client/voice/VoiceUDPClient.js | 12 +++++++++++- src/client/voice/VoiceWebSocket.js | 18 +++++++++++++++--- .../voice/dispatcher/StreamDispatcher.js | 5 ++++- src/client/voice/player/AudioPlayer.js | 9 ++++----- src/client/voice/player/BasePlayer.js | 3 +++ test/random.js | 1 + 8 files changed, 56 insertions(+), 11 deletions(-) diff --git a/src/client/voice/ClientVoiceManager.js b/src/client/voice/ClientVoiceManager.js index 1808bfe75..6a572edf1 100644 --- a/src/client/voice/ClientVoiceManager.js +++ b/src/client/voice/ClientVoiceManager.js @@ -243,6 +243,7 @@ class ClientVoiceManager { this.connections.set(channel.guild.id, voiceConnection); voiceConnection.once('ready', () => resolve(voiceConnection)); voiceConnection.once('error', reject); + voiceConnection.once('disconnected', () => this.connections.delete(channel.guild.id)); }); }); } diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index a367718d3..dbe54dfaf 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -42,7 +42,6 @@ class VoiceConnection extends EventEmitter { this.player.on('error', e => { this.emit('warn', e); - console.log('so yeah uh' + e); this.player.cleanup(); }); @@ -63,9 +62,26 @@ class VoiceConnection extends EventEmitter { speaking: true, delay: 0, }, + }) + .catch(e => { + this.emit('debug', e); }); } + disconnect() { + this.emit('closing'); + this.voiceManager.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, + }, + }); + this.emit('disconnected'); + } + connect() { if (this.sockets.ws) { throw new Error('There is already an existing WebSocket connection!'); diff --git a/src/client/voice/VoiceUDPClient.js b/src/client/voice/VoiceUDPClient.js index 9ae701f40..ef6b4936f 100644 --- a/src/client/voice/VoiceUDPClient.js +++ b/src/client/voice/VoiceUDPClient.js @@ -49,6 +49,17 @@ class VoiceConnectionUDPClient extends EventEmitter { * @type {?string} */ this.localPort = null; + this.voiceConnection.on('closing', this.shutdown.bind(this)); + } + shutdown() { + if (this.socket) { + try { + this.socket.close(); + } catch (e) { + return; + } + this.socket = null; + } } /** * The port of the discord voice server @@ -57,7 +68,6 @@ class VoiceConnectionUDPClient extends EventEmitter { get discordPort() { return this.voiceConnection.authentication.port; } - /** * Tries to resolve the voice server endpoint to an address * @returns {Promise} diff --git a/src/client/voice/VoiceWebSocket.js b/src/client/voice/VoiceWebSocket.js index 688951c5c..30c3d98c1 100644 --- a/src/client/voice/VoiceWebSocket.js +++ b/src/client/voice/VoiceWebSocket.js @@ -22,6 +22,15 @@ class VoiceWebSocket extends EventEmitter { */ this.attempts = 0; this.connect(); + + this.dead = false; + + this.voiceConnection.on('closing', this.shutdown.bind(this)); + } + + shutdown() { + this.dead = true; + this.reset(); } /** @@ -50,6 +59,9 @@ class VoiceWebSocket extends EventEmitter { * Starts connecting to the Voice WebSocket Server. */ connect() { + if (this.dead) { + return; + } if (this.ws) { this.reset(); } @@ -76,7 +88,7 @@ class VoiceWebSocket extends EventEmitter { */ send(data) { return new Promise((resolve, reject) => { - if (this.ws.readyState === WebSocket.OPEN) { + if (this.ws && this.ws.readyState === WebSocket.OPEN) { this.ws.send(data, null, error => { if (error) { reject(error); @@ -85,7 +97,7 @@ class VoiceWebSocket extends EventEmitter { } }); } else { - reject(new Error('websocket not open')); + reject(new Error('websocket not open for ' + data)); } }); } @@ -140,7 +152,7 @@ class VoiceWebSocket extends EventEmitter { */ onClose(event) { // #todo see if the connection is open before reconnecting - this.client.setTimeout(this.connect.bind(this), this.attempts * 1000); + if (!this.dead) this.client.setTimeout(this.connect.bind(this), this.attempts * 1000); } /** diff --git a/src/client/voice/dispatcher/StreamDispatcher.js b/src/client/voice/dispatcher/StreamDispatcher.js index 63d335e4a..c49a146cc 100644 --- a/src/client/voice/dispatcher/StreamDispatcher.js +++ b/src/client/voice/dispatcher/StreamDispatcher.js @@ -134,7 +134,10 @@ class StreamDispatcher extends EventEmitter { _sendBuffer(buffer, sequence, timestamp) { let repeats = this.passes; const packet = this._createPacket(sequence, timestamp, this.player.opusEncoder.encode(buffer)); - while (repeats--) this.player.voiceConnection.sockets.udp.send(packet).catch(e => console.log('so uhhh', e)); + while (repeats--) { + this.player.voiceConnection.sockets.udp.send(packet) + .catch(e => this.emit('debug', `failed to send a packet ${e}`)); + } } _createPacket(sequence, timestamp, buffer) { diff --git a/src/client/voice/player/AudioPlayer.js b/src/client/voice/player/AudioPlayer.js index 0774bfe14..9b6735271 100644 --- a/src/client/voice/player/AudioPlayer.js +++ b/src/client/voice/player/AudioPlayer.js @@ -20,12 +20,13 @@ class AudioPlayer extends EventEmitter { timestamp: 0, pausedTime: 0, }; + this.voiceConnection.on('closing', () => this.cleanup(null, 'voice connection is closing')); } playUnknownStream(stream, { seek = 0, volume = 1, passes = 1 } = {}) { const options = { seek, volume, passes }; stream.on('end', () => { - console.log(Date.now(), 'real input stream ended'); + this.emit('debug', 'input stream to converter has ended'); }); stream.on('error', e => this.emit('error', e)); const conversionProcess = this.audioToPCM.createConvertStream(options.seek); @@ -36,7 +37,7 @@ class AudioPlayer extends EventEmitter { cleanup(checkStream, reason) { // cleanup is a lot less aggressive than v9 because it doesn't try to kill every single stream it is aware of - console.log(Date.now(), 'clean up triggered due to', reason); + this.emit('debug', `clean up triggered due to ${reason}`); const filter = checkStream && this.currentDispatcher && this.currentDispatcher.stream === checkStream; if (this.currentConverter && (checkStream ? filter : true)) { this.currentConverter.destroy(); @@ -46,9 +47,7 @@ class AudioPlayer extends EventEmitter { playPCMStream(stream, converter, { seek = 0, volume = 1, passes = 1 } = {}) { const options = { seek, volume, passes }; - stream.on('end', () => { - console.log(Date.now(), 'pcm input stream ended'); - }); + stream.on('end', () => this.emit('debug', 'pcm input stream ended')); this.cleanup(null, 'outstanding play stream'); this.currentConverter = converter; if (this.currentDispatcher) { diff --git a/src/client/voice/player/BasePlayer.js b/src/client/voice/player/BasePlayer.js index 3b02deca5..a38e4906d 100644 --- a/src/client/voice/player/BasePlayer.js +++ b/src/client/voice/player/BasePlayer.js @@ -101,6 +101,9 @@ class VoiceConnectionPlayer extends EventEmitter { speaking: true, delay: 0, }, + }) + .catch(e => { + this.emit('debug', e); }); } diff --git a/test/random.js b/test/random.js index 2121c5775..efc8662f6 100644 --- a/test/random.js +++ b/test/random.js @@ -160,6 +160,7 @@ let disp, con; client.on('message', msg => { if (msg.content.startsWith('/play')) { + console.log('I am now going to play', msg.content); const chan = msg.content.split(' ').slice(1).join(' '); con.playStream(ytdl(chan, {filter : 'audioonly'}), { passes : 4 }); } From 5844bbb54cd9755152dfbe4a8a77b1c71c4d457b Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 25 Oct 2016 14:38:56 +0100 Subject: [PATCH 150/188] Fix travis builds --- docs/generator/types/DocumentedMember.js | 1 + src/client/voice/VoiceConnection.js | 5 ++++- src/client/voice/VoiceUDPClient.js | 1 + src/client/voice/VoiceWebSocket.js | 5 ++--- src/client/voice/dispatcher/StreamDispatcher.js | 1 - src/client/voice/player/AudioPlayer.js | 1 + 6 files changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/generator/types/DocumentedMember.js b/docs/generator/types/DocumentedMember.js index 3eaddc24e..632bf382f 100644 --- a/docs/generator/types/DocumentedMember.js +++ b/docs/generator/types/DocumentedMember.js @@ -40,6 +40,7 @@ class DocumentedMember extends DocumentedItem { serialize() { super.serialize(); + console.log('serializing', this); const { id, name, description, memberof, type, access, meta, properties } = this.directData; return { id, diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index dbe54dfaf..9f8c38d89 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -1,6 +1,5 @@ const VoiceWebSocket = require('./VoiceWebSocket'); const VoiceUDP = require('./VoiceUDPClient'); -const VoiceReceiver = require('./receiver/VoiceReceiver'); const Constants = require('../../util/Constants'); const AudioPlayer = require('./player/AudioPlayer'); const EventEmitter = require('events').EventEmitter; @@ -40,6 +39,10 @@ class VoiceConnection extends EventEmitter { this.player = new AudioPlayer(this); + this.player.on('debug', m => { + this.emit('debug', `audio player - ${m}`); + }); + this.player.on('error', e => { this.emit('warn', e); this.player.cleanup(); diff --git a/src/client/voice/VoiceUDPClient.js b/src/client/voice/VoiceUDPClient.js index ef6b4936f..3a13b675a 100644 --- a/src/client/voice/VoiceUDPClient.js +++ b/src/client/voice/VoiceUDPClient.js @@ -63,6 +63,7 @@ class VoiceConnectionUDPClient extends EventEmitter { } /** * The port of the discord voice server + * @type {number} * @readonly */ get discordPort() { diff --git a/src/client/voice/VoiceWebSocket.js b/src/client/voice/VoiceWebSocket.js index 30c3d98c1..290dbf8ea 100644 --- a/src/client/voice/VoiceWebSocket.js +++ b/src/client/voice/VoiceWebSocket.js @@ -97,7 +97,7 @@ class VoiceWebSocket extends EventEmitter { } }); } else { - reject(new Error('websocket not open for ' + data)); + reject(new Error(`voice websocket not open to send ${data}`)); } }); } @@ -148,9 +148,8 @@ class VoiceWebSocket extends EventEmitter { /** * Called whenever the connection to the WebSocket Server is lost - * @param {CloseEvent} event the close event */ - onClose(event) { + onClose() { // #todo see if the connection is open before reconnecting if (!this.dead) this.client.setTimeout(this.connect.bind(this), this.attempts * 1000); } diff --git a/src/client/voice/dispatcher/StreamDispatcher.js b/src/client/voice/dispatcher/StreamDispatcher.js index c49a146cc..961ad97f4 100644 --- a/src/client/voice/dispatcher/StreamDispatcher.js +++ b/src/client/voice/dispatcher/StreamDispatcher.js @@ -255,7 +255,6 @@ class StreamDispatcher extends EventEmitter { _triggerTerminalState(state, err) { if (this._triggered) return; - console.log(state, err); /** * Emitted when the stream wants to give debug information. * @event StreamDispatcher#debug diff --git a/src/client/voice/player/AudioPlayer.js b/src/client/voice/player/AudioPlayer.js index 9b6735271..fe8ca5b68 100644 --- a/src/client/voice/player/AudioPlayer.js +++ b/src/client/voice/player/AudioPlayer.js @@ -59,6 +59,7 @@ class AudioPlayer extends EventEmitter { dispatcher.on('end', () => this.cleanup(dispatcher.stream, 'disp ended')); dispatcher.on('speaking', value => this.voiceConnection.setSpeaking(value)); this.currentDispatcher = dispatcher; + dispatcher.on('debug', m => this.emit('debug', `stream dispatch - ${m}`)); return dispatcher; } From 2b2bbb565d5bff1dbe29e1c69d2e8733cec718aa Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 25 Oct 2016 14:46:50 +0100 Subject: [PATCH 151/188] don't require longjohn --- src/client/voice/pcm/FfmpegConverterEngine.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/client/voice/pcm/FfmpegConverterEngine.js b/src/client/voice/pcm/FfmpegConverterEngine.js index e37db8364..eed553181 100644 --- a/src/client/voice/pcm/FfmpegConverterEngine.js +++ b/src/client/voice/pcm/FfmpegConverterEngine.js @@ -1,7 +1,6 @@ const ConverterEngine = require('./ConverterEngine'); const ChildProcess = require('child_process'); -const EventEmitter = require('events').EventEmitter; -require('longjohn'); +const EventEmitter = require('events').EventEmitter class PCMConversionProcess extends EventEmitter { From b50bec8a44a323a40c3dc6753e0c1fc256524c2b Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 25 Oct 2016 15:02:16 +0100 Subject: [PATCH 152/188] whoops broke travis again --- src/client/voice/pcm/FfmpegConverterEngine.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/voice/pcm/FfmpegConverterEngine.js b/src/client/voice/pcm/FfmpegConverterEngine.js index eed553181..e49798ed8 100644 --- a/src/client/voice/pcm/FfmpegConverterEngine.js +++ b/src/client/voice/pcm/FfmpegConverterEngine.js @@ -1,6 +1,6 @@ const ConverterEngine = require('./ConverterEngine'); const ChildProcess = require('child_process'); -const EventEmitter = require('events').EventEmitter +const EventEmitter = require('events').EventEmitter; class PCMConversionProcess extends EventEmitter { From f77af72d71f366b2c0fbee7d86ca09466241eccb Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 25 Oct 2016 19:41:54 +0100 Subject: [PATCH 153/188] Add voice receiving again \o/ --- src/client/voice/VoiceConnection.js | 40 ++++++++++++++++++++++ src/client/voice/receiver/VoiceReceiver.js | 18 +++++----- 2 files changed, 49 insertions(+), 9 deletions(-) diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index 9f8c38d89..21d1f2669 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -2,6 +2,7 @@ const VoiceWebSocket = require('./VoiceWebSocket'); const VoiceUDP = require('./VoiceUDPClient'); const Constants = require('../../util/Constants'); const AudioPlayer = require('./player/AudioPlayer'); +const VoiceReceiver = require('./receiver/VoiceReceiver'); const EventEmitter = require('events').EventEmitter; const fs = require('fs'); @@ -31,6 +32,8 @@ class VoiceConnection extends EventEmitter { */ this.channel = pendingConnection.channel; + this.receivers = []; + /** * The authentication data needed to connect to the voice server * @type {object} @@ -48,6 +51,8 @@ class VoiceConnection extends EventEmitter { this.player.cleanup(); }); + this.ssrcMap = new Map(); + /** * Object that wraps contains the `ws` and `udp` sockets of this voice connection * @type {object} @@ -110,6 +115,35 @@ class VoiceConnection extends EventEmitter { this.authentication.secretKey = secret; this.emit('ready'); }); + this.sockets.ws.on('speaking', data => { + const guild = this.channel.guild; + const user = this.voiceManager.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); + guild._memberSpeakUpdate(data.user_id, data.speaking); + }); } playFile(file, options) { @@ -126,6 +160,12 @@ class VoiceConnection extends EventEmitter { return this.player.playPCMStream(stream, options); } + createReceiver() { + const receiver = new VoiceReceiver(this); + this.receivers.push(receiver); + return receiver; + } + } module.exports = VoiceConnection; diff --git a/src/client/voice/receiver/VoiceReceiver.js b/src/client/voice/receiver/VoiceReceiver.js index 3e1c24c82..cf7582e50 100644 --- a/src/client/voice/receiver/VoiceReceiver.js +++ b/src/client/voice/receiver/VoiceReceiver.js @@ -34,10 +34,10 @@ class VoiceReceiver extends EventEmitter { * The VoiceConnection that instantiated this * @type {VoiceConnection} */ - this.connection = connection; + this.voiceConnection = connection; this._listener = (msg => { const ssrc = +msg.readUInt32BE(8).toString(10); - const user = this.connection.ssrcMap.get(ssrc); + const user = this.voiceConnection.ssrcMap.get(ssrc); if (!user) { if (!this.queues.has(ssrc)) this.queues.set(ssrc, []); this.queues.get(ssrc).push(msg); @@ -51,7 +51,7 @@ class VoiceReceiver extends EventEmitter { this.handlePacket(msg, user); } }).bind(this); - this.connection.udp.udpSocket.on('message', this._listener); + this.voiceConnection.sockets.udp.socket.on('message', this._listener); } /** @@ -61,7 +61,7 @@ class VoiceReceiver extends EventEmitter { */ recreate() { if (!this.destroyed) return; - this.connection.udp.udpSocket.on('message', this._listener); + this.voiceConnection.sockets.udp.socket.on('message', this._listener); this.destroyed = false; return; } @@ -70,7 +70,7 @@ class VoiceReceiver extends EventEmitter { * Destroy this VoiceReceiver, also ending any streams that it may be controlling. */ destroy() { - this.connection.udp.udpSocket.removeListener('message', this._listener); + this.voiceConnection.sockets.udp.socket.removeListener('message', this._listener); for (const stream of this.pcmStreams) { stream[1]._push(null); this.pcmStreams.delete(stream[0]); @@ -89,7 +89,7 @@ class VoiceReceiver extends EventEmitter { * @returns {ReadableStream} */ createOpusStream(user) { - user = this.connection.manager.client.resolver.resolveUser(user); + user = this.voiceConnection.voiceManager.client.resolver.resolveUser(user); if (!user) throw new Error('Couldn\'t resolve the user to create Opus stream.'); if (this.opusStreams.get(user.id)) throw new Error('There is already an existing stream for that user.'); const stream = new Readable(); @@ -104,7 +104,7 @@ class VoiceReceiver extends EventEmitter { * @returns {ReadableStream} */ createPCMStream(user) { - user = this.connection.manager.client.resolver.resolveUser(user); + user = this.voiceConnection.voiceManager.client.resolver.resolveUser(user); if (!user) throw new Error('Couldn\'t resolve the user to create PCM stream.'); if (this.pcmStreams.get(user.id)) throw new Error('There is already an existing stream for that user.'); const stream = new Readable(); @@ -114,7 +114,7 @@ class VoiceReceiver extends EventEmitter { handlePacket(msg, user) { msg.copy(nonce, 0, 0, 12); - let data = NaCl.secretbox.open(msg.slice(12), nonce, this.connection.data.secret); + let data = NaCl.secretbox.open(msg.slice(12), nonce, this.voiceConnection.authentication.secretKey.key); if (!data) { /** * Emitted whenever a voice packet cannot be decrypted @@ -141,7 +141,7 @@ class VoiceReceiver extends EventEmitter { * @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); + const pcm = this.voiceConnection.player.opusEncoder.decode(data); if (this.pcmStreams.get(user.id)) this.pcmStreams.get(user.id)._push(pcm); this.emit('pcm', user, pcm); } From 5bd18e60519473c1f5c8a65c945f52ec02ca9163 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 25 Oct 2016 19:47:17 +0100 Subject: [PATCH 154/188] add some documentation --- docs/docs.json | 2 +- src/client/voice/VoiceConnection.js | 71 +++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index cd5856b44..a8d1cb139 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1477285044501},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array or collection of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]],[["Collection",".<"],["string",", "],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":23,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"oldEmoji","description":"The old emoji","type":{"types":[[["Emoji",""]]]}},{"name":"newEmoji","description":"The new emoji","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":286,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":200,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nIf you do not select an amount of shards, the manager will automatically decide the best amount.\nThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":161,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":172,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":187,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":8,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":87,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar('./avatar.png')\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":101,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["FileResolvable",""]],[["Base64Resolveable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":118,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":128,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":140,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#addFriend","name":"addFriend","description":"Send a friend request\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":150,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to send the friend request to.","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"ClientUser#removeFriend","name":"removeFriend","description":"Remove a friend\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":161,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to remove from your friends","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":171,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#block","name":"block","description":"Blocks the user","memberof":"ClientUser","inherits":"User#block","inherited":true,"meta":{"line":158,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"ClientUser#unblock","name":"unblock","description":"Unblocks the user","memberof":"ClientUser","inherits":"User#unblock","inherited":true,"meta":{"line":166,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":176,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":194,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":16,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#friends","name":"friends","description":"A Collection of friends for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":31,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#blocked","name":"blocked","description":"A Collection of blocked users for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":38,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.\nOnly OAuth bot accounts can use this method.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":133,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":165,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":204,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"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":232,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["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":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the 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":300,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":319,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":248,"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":257,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.first();\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.\nOnly OAuth bot accounts can use this method.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":133,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":165,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":204,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"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":232,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["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":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the 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":300,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":319,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":248,"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":257,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":331,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":341,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":350,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":358,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":372,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":393,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":414,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":443,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#type","name":"type","description":"The type of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":107,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":118,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":209,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":218,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":227,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":237,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":276,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":285,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":294,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":305,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":134,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":42,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":48,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":54,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":66,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":83,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":138,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.\nOnly OAuth bot accounts can use this method.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":133,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":165,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":204,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"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":232,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["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":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the 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":300,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":319,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":248,"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":257,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#addFriend","name":"addFriend","description":"Sends a friend request to the user","memberof":"User","meta":{"line":142,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#removeFriend","name":"removeFriend","description":"Removes the user from your friends","memberof":"User","meta":{"line":150,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#block","name":"block","description":"Blocks the user","memberof":"User","meta":{"line":158,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#unblock","name":"unblock","description":"Unblocks the user","memberof":"User","meta":{"line":166,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":176,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":194,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":74,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":87,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":97,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":200,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#filterArray","name":"filterArray","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":238,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":253,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":268,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":283,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":295,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":309,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.\nOnly OAuth bot accounts can use this method.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":133,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":165,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":204,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":232,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["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":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The 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":300,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":319,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":248,"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":257,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":145,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":280,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMatches","description":"Maximum number of successfully filtered messages to obtain","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"WebhookMessageOptions","name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1477421223832},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array or collection of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]],[["Collection",".<"],["string",", "],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":23,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"oldEmoji","description":"The old emoji","type":{"types":[[["Emoji",""]]]}},{"name":"newEmoji","description":"The new emoji","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":286,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":700,"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":723,"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":748,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":83,"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":91,"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":99,"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":106,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":113,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":120,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"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":126,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":198,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":239,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":248,"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":258,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#voiceConnection","name":"voiceConnection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"SecretKey","name":"SecretKey","description":"Represents a Secret Key used in encryption over voice","meta":{"line":4,"file":"SecretKey.js","path":"src/client/voice/util"},"methods":[],"properties":[{"id":"SecretKey#key","name":"key","description":"The key used for encryption","memberof":"SecretKey","type":{"types":[[["Uint8Array",""]]]},"meta":{"line":10,"file":"SecretKey.js","path":"src/client/voice/util"},"props":[]}],"events":[]},{"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":19,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnect the voice connection, causing a disconnected and closing event to be emitted.","memberof":"VoiceConnection","meta":{"line":99,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":194,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.log);"],"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":225,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":234,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#voiceManager","name":"voiceManager","description":"The Voice Manager that instantiated this connection","memberof":"VoiceConnection","type":{"types":[[["ClientVoiceManager",""]]]},"meta":{"line":27,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The voice channel this connection is currently serving","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#receivers","name":"receivers","description":"An array of Voice Receivers that have been created for this connection","memberof":"VoiceConnection","type":{"types":[[["Array",".<"],["VoiceReceiver",">"]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#authentication","name":"authentication","description":"The authentication data needed to connect to the voice server","memberof":"VoiceConnection","type":{"types":[[["object",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#player","name":"player","description":"The audio player for this voice connection","memberof":"VoiceConnection","type":{"types":[[["AudioPlayer",""]]]},"meta":{"line":51,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ssrcMap","name":"ssrcMap","description":"Map SSRC to speaking values","memberof":"VoiceConnection","type":{"types":[[["Map",".<"],["number",", "],["boolean",">"]]]},"meta":{"line":66,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#sockets","name":"sockets","description":"Object that wraps contains the `ws` and `udp` sockets of this voice connection","memberof":"VoiceConnection","type":{"types":[[["object",""]]]},"meta":{"line":72,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":162,"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":"VoiceConnectionUDPClient","name":"VoiceConnectionUDPClient","description":"Represents a UDP Client for a Voice Connection","meta":{"line":24,"file":"VoiceUDPClient.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnectionUDPClient#findEndpointAddress","name":"findEndpointAddress","description":"Tries to resolve the voice server endpoint to an address","memberof":"VoiceConnectionUDPClient","meta":{"line":76,"file":"VoiceUDPClient.js","path":"src/client/voice"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[]},{"id":"VoiceConnectionUDPClient#send","name":"send","description":"Send a packet to the UDP client","memberof":"VoiceConnectionUDPClient","meta":{"line":94,"file":"VoiceUDPClient.js","path":"src/client/voice"},"returns":{"types":[[["Promise",".<"],["Object",">"]]]},"params":[{"name":"packet","description":"the packet to send","type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"VoiceConnectionUDPClient#voiceConnection","name":"voiceConnection","description":"The voice connection that this UDP client serves","memberof":"VoiceConnectionUDPClient","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":31,"file":"VoiceUDPClient.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnectionUDPClient#socket","name":"socket","description":"The UDP socket","memberof":"VoiceConnectionUDPClient","type":{"types":[[["Socket",""]]]},"meta":{"line":36,"file":"VoiceUDPClient.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnectionUDPClient#discordAddress","name":"discordAddress","description":"The address of the discord voice server","memberof":"VoiceConnectionUDPClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"VoiceUDPClient.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnectionUDPClient#localAddress","name":"localAddress","description":"The local IP address","memberof":"VoiceConnectionUDPClient","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"VoiceUDPClient.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnectionUDPClient#localPort","name":"localPort","description":"The local port","memberof":"VoiceConnectionUDPClient","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"VoiceUDPClient.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnectionUDPClient#discordPort","name":"discordPort","description":"The port of the discord voice server","memberof":"VoiceConnectionUDPClient","type":{"types":[[["number",""]]]},"meta":{"line":69,"file":"VoiceUDPClient.js","path":"src/client/voice"},"props":[]}],"events":[]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":200,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nIf you do not select an amount of shards, the manager will automatically decide the best amount.\nThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":161,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":172,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":187,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":8,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":87,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar('./avatar.png')\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":101,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["FileResolvable",""]],[["Base64Resolveable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":118,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":128,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":140,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#addFriend","name":"addFriend","description":"Send a friend request\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":150,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to send the friend request to.","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"ClientUser#removeFriend","name":"removeFriend","description":"Remove a friend\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":161,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to remove from your friends","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":171,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#block","name":"block","description":"Blocks the user","memberof":"ClientUser","inherits":"User#block","inherited":true,"meta":{"line":158,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"ClientUser#unblock","name":"unblock","description":"Unblocks the user","memberof":"ClientUser","inherits":"User#unblock","inherited":true,"meta":{"line":166,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":176,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":194,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":16,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#friends","name":"friends","description":"A Collection of friends for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":31,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#blocked","name":"blocked","description":"A Collection of blocked users for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":38,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.\nOnly OAuth bot accounts can use this method.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":133,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":165,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":204,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"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":232,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["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":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the 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":300,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":319,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":248,"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":257,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.first();\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.\nOnly OAuth bot accounts can use this method.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":133,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":165,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":204,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"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":232,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["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":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the 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":300,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":319,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":248,"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":257,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":331,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":341,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":350,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":358,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":372,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":393,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":414,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":443,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#type","name":"type","description":"The type of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":107,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":118,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":209,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":218,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":227,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":237,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":276,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":285,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":294,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":305,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":134,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":42,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":48,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":54,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":66,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":83,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":138,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.\nOnly OAuth bot accounts can use this method.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":133,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":165,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":204,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"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":232,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["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":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the 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":300,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":319,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":248,"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":257,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#addFriend","name":"addFriend","description":"Sends a friend request to the user","memberof":"User","meta":{"line":142,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#removeFriend","name":"removeFriend","description":"Removes the user from your friends","memberof":"User","meta":{"line":150,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#block","name":"block","description":"Blocks the user","memberof":"User","meta":{"line":158,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#unblock","name":"unblock","description":"Unblocks the user","memberof":"User","meta":{"line":166,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":176,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":194,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":74,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":87,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":97,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":200,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#filterArray","name":"filterArray","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":238,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":253,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":268,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":283,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":295,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":309,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.\nOnly OAuth bot accounts can use this method.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":133,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":165,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":204,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":232,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["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":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The 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":300,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":319,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":248,"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":257,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":173,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":145,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":280,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMatches","description":"Maximum number of successfully filtered messages to obtain","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"WebhookMessageOptions","name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index 21d1f2669..13b92b14d 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -32,6 +32,10 @@ class VoiceConnection extends EventEmitter { */ this.channel = pendingConnection.channel; + /** + * An array of Voice Receivers that have been created for this connection + * @type {VoiceReceiver[]} + */ this.receivers = []; /** @@ -40,6 +44,10 @@ class VoiceConnection extends EventEmitter { */ this.authentication = pendingConnection.data; + /** + * The audio player for this voice connection + * @type {AudioPlayer} + */ this.player = new AudioPlayer(this); this.player.on('debug', m => { @@ -51,6 +59,10 @@ class VoiceConnection extends EventEmitter { this.player.cleanup(); }); + /** + * Map SSRC to speaking values + * @type {Map} + */ this.ssrcMap = new Map(); /** @@ -61,6 +73,11 @@ class VoiceConnection extends EventEmitter { this.connect(); } + /** + * Sets whether the voice connection should display as "speaking" or not + * @param {boolean} value whether or not to speak + * @private + */ setSpeaking(value) { if (this.speaking === value) return; this.speaking = value; @@ -76,6 +93,9 @@ class VoiceConnection extends EventEmitter { }); } + /** + * Disconnect the voice connection, causing a disconnected and closing event to be emitted. + */ disconnect() { this.emit('closing'); this.voiceManager.client.ws.send({ @@ -90,6 +110,10 @@ class VoiceConnection extends EventEmitter { this.emit('disconnected'); } + /** + * Connect the voice connection + * @private + */ connect() { if (this.sockets.ws) { throw new Error('There is already an existing WebSocket connection!'); @@ -146,20 +170,67 @@ class VoiceConnection extends EventEmitter { }); } + /** + * Options that can be passed to stream-playing methods: + * @typedef {Object} StreamOptions + * @property {number} [seek=0] The time to seek to + * @property {number} [volume=1] The volume to play at + * @property {number} [passes=1] How many times to send the voice packet to reduce packet loss + */ + + /** + * Play the given file in the voice connection. + * @param {string} file The path to the file + * @param {StreamOptions} [options] Options for playing the stream + * @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, options) { return this.playStream(fs.createReadStream(file), options); } + /** + * Plays and converts an audio stream in the voice connection. + * @param {ReadableStream} stream The audio stream to play + * @param {StreamOptions} [options] Options for playing the stream + * @returns {StreamDispatcher} + * @example + * // play streams using ytdl-core + * const ytdl = require('ytdl-core'); + * const streamOptions = { seek: 0, volume: 1 }; + * voiceChannel.join() + * .then(connection => { + * const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'}); + * const dispatcher = connection.playStream(stream, streamOptions); + * }) + * .catch(console.log); + */ playStream(stream, { seek = 0, volume = 1, passes = 1 } = {}) { const options = { seek, volume, passes }; return this.player.playUnknownStream(stream, options); } + /** + * Plays a stream of 16-bit signed stereo PCM at 48KHz. + * @param {ReadableStream} stream The audio stream to play. + * @param {StreamOptions} [options] Options for playing the stream + * @returns {StreamDispatcher} + */ playConvertedStream(stream, { seek = 0, volume = 1, passes = 1 } = {}) { const options = { seek, volume, passes }; return this.player.playPCMStream(stream, options); } + /** + * Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these. + * @returns {VoiceReceiver} + */ createReceiver() { const receiver = new VoiceReceiver(this); this.receivers.push(receiver); From 2ee6da8d79417a40d14d091e0ea8dc8482b910da Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 25 Oct 2016 19:52:10 +0100 Subject: [PATCH 155/188] redo docs again --- src/client/voice/VoiceConnection.js | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index 13b92b14d..d3fc2149f 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -7,7 +7,7 @@ const EventEmitter = require('events').EventEmitter; const fs = require('fs'); /** - * Represents a connection to a Voice Channel in Discord. + * Represents a connection to a Voice Channel in Discord. v10 flag. * ```js * // obtained using: * voiceChannel.join().then(connection => { @@ -51,10 +51,20 @@ class VoiceConnection extends EventEmitter { this.player = new AudioPlayer(this); this.player.on('debug', m => { + /** + * Debug info from the connection + * @event VoiceConnection#debug + * @param {string} message the debug message + */ this.emit('debug', `audio player - ${m}`); }); this.player.on('error', e => { + /** + * Warning info from the connection + * @event VoiceConnection#warn + * @param {string|error} warning the warning + */ this.emit('warn', e); this.player.cleanup(); }); @@ -107,6 +117,10 @@ class VoiceConnection extends EventEmitter { self_deaf: false, }, }); + /** + * Emitted when the voice connection disconnects + * @event VoiceConnection#disconnected + */ this.emit('disconnected'); } @@ -128,6 +142,11 @@ class VoiceConnection extends EventEmitter { this.sockets.ws.once('ready', d => { this.authentication.port = d.port; this.authentication.ssrc = d.ssrc; + /** + * Emitted whenever the connection encounters an error. + * @event VoiceConnection#error + * @param {Error} error the encountered error + */ this.sockets.udp.findEndpointAddress() .then(address => { this.sockets.udp.createUDPSocket(address); @@ -137,6 +156,11 @@ class VoiceConnection extends EventEmitter { this.sockets.ws.once('sessionDescription', (mode, secret) => { this.authentication.encryptionMode = mode; this.authentication.secretKey = secret; + /** + * Emitted once the connection is ready, when a promise to join a voice channel resolves, + * the connection will already be ready. + * @event VoiceConnection#ready + */ this.emit('ready'); }); this.sockets.ws.on('speaking', data => { From 0f8e8dddff99219223d74e8eaa1ba416f6164594 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 25 Oct 2016 21:40:53 +0100 Subject: [PATCH 156/188] fix presence updating --- src/client/websocket/packets/handlers/Ready.js | 2 +- src/structures/ClientUser.js | 1 + src/util/Constants.js | 2 ++ test/random.js | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/client/websocket/packets/handlers/Ready.js b/src/client/websocket/packets/handlers/Ready.js index b512c962d..bb35ea47b 100644 --- a/src/client/websocket/packets/handlers/Ready.js +++ b/src/client/websocket/packets/handlers/Ready.js @@ -31,7 +31,7 @@ class ReadyHandler extends AbstractHandler { client._setPresence(presence.user.id, presence); } - if (!client.user.bot) client.setInterval(client.syncGuilds.bind(client), 30000); + if (!client.user.bot && client.options.sync) client.setInterval(client.syncGuilds.bind(client), 30000); client.once('ready', client.syncGuilds.bind(client)); if (!client.users.has('1')) { diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index ab19f5ea7..899504411 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -198,6 +198,7 @@ class ClientUser extends User { this.localPresence = { status, game, afk }; this.localPresence.since = 0; + this.localPresence.game = this.localPresence.game || null; this.client.ws.send({ op: 3, diff --git a/src/util/Constants.js b/src/util/Constants.js index 2adb29dae..cd163cc37 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -8,6 +8,7 @@ exports.Package = require('../../package.json'); * @property {number} [shardId=0] The ID of this shard * @property {number} [shardCount=0] The number of shards * @property {number} [messageCacheMaxSize=200] Maximum number of messages to cache per channel + * @property {boolean} [sync=false] Whether to periodically sync guilds * (-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely) * @property {number} [messageCacheLifetime=0] How long until a message should be uncached by the message sweeping * (in seconds, 0 for forever) @@ -34,6 +35,7 @@ exports.DefaultOptions = { disableEveryone: false, restWsBridgeTimeout: 5000, disabledEvents: [], + sync: false, /** * Websocket options. These are left as snake_case to match the API. diff --git a/test/random.js b/test/random.js index efc8662f6..502c43456 100644 --- a/test/random.js +++ b/test/random.js @@ -8,7 +8,7 @@ const client = new Discord.Client({ fetchAllMembers: false, apiRequestMethod: 's const { email, password, token, usertoken, song } = require('./auth.json'); -client.login(token).then(atoken => console.log('logged in with token ' + atoken)).catch(console.error); +client.login(usertoken).then(atoken => console.log('logged in with token ' + atoken)).catch(console.error); client.ws.on('send', console.log); From ff16c9f01fbfc1dd6ed1d3f364c40284bb84f2ac Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 25 Oct 2016 21:55:38 +0100 Subject: [PATCH 157/188] change currentDispatcher to just dispatcher --- src/client/voice/player/AudioPlayer.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/client/voice/player/AudioPlayer.js b/src/client/voice/player/AudioPlayer.js index fe8ca5b68..dc7e3b8c9 100644 --- a/src/client/voice/player/AudioPlayer.js +++ b/src/client/voice/player/AudioPlayer.js @@ -11,7 +11,7 @@ class AudioPlayer extends EventEmitter { this.audioToPCM = new (PCMConverters.fetch())(); this.opusEncoder = OpusEncoders.fetch(); this.currentConverter = null; - this.currentDispatcher = null; + this.dispatcher = null; this.audioToPCM.on('error', e => this.emit('error', e)); this.streamingData = { channels: 2, @@ -38,7 +38,7 @@ class AudioPlayer extends EventEmitter { cleanup(checkStream, reason) { // cleanup is a lot less aggressive than v9 because it doesn't try to kill every single stream it is aware of this.emit('debug', `clean up triggered due to ${reason}`); - const filter = checkStream && this.currentDispatcher && this.currentDispatcher.stream === checkStream; + const filter = checkStream && this.dispatcher && this.dispatcher.stream === checkStream; if (this.currentConverter && (checkStream ? filter : true)) { this.currentConverter.destroy(); this.currentConverter = null; @@ -50,15 +50,15 @@ class AudioPlayer extends EventEmitter { stream.on('end', () => this.emit('debug', 'pcm input stream ended')); this.cleanup(null, 'outstanding play stream'); this.currentConverter = converter; - if (this.currentDispatcher) { - this.streamingData = this.currentDispatcher.streamingData; + if (this.dispatcher) { + this.streamingData = this.dispatcher.streamingData; } stream.on('error', e => this.emit('error', e)); const dispatcher = new StreamDispatcher(this, stream, this.streamingData, options); dispatcher.on('error', e => this.emit('error', e)); dispatcher.on('end', () => this.cleanup(dispatcher.stream, 'disp ended')); dispatcher.on('speaking', value => this.voiceConnection.setSpeaking(value)); - this.currentDispatcher = dispatcher; + this.dispatcher = dispatcher; dispatcher.on('debug', m => this.emit('debug', `stream dispatch - ${m}`)); return dispatcher; } From add52ce62d24a03e127b5c2deee5812fd9b0ad0d Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 25 Oct 2016 22:03:04 +0100 Subject: [PATCH 158/188] Fix #837 --- src/structures/Message.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/Message.js b/src/structures/Message.js index 6b0ae77c3..0fbb88722 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -396,7 +396,7 @@ class Message { content = `${prepend}${content}`; if (options.split) { - if (typeof options.split !== 'object') options.split = {}; + if (typeof options.split !== 'object' && typeof options.split !== 'boolean') options.split = {}; if (!options.split.prepend) options.split.prepend = prepend; } From 526430b51aeaa34257a406aa39980522888ac61b Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Tue, 25 Oct 2016 18:49:12 -0400 Subject: [PATCH 159/188] Revert "Fix #837" This reverts commit add52ce62d24a03e127b5c2deee5812fd9b0ad0d. --- src/structures/Message.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/Message.js b/src/structures/Message.js index 0fbb88722..6b0ae77c3 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -396,7 +396,7 @@ class Message { content = `${prepend}${content}`; if (options.split) { - if (typeof options.split !== 'object' && typeof options.split !== 'boolean') options.split = {}; + if (typeof options.split !== 'object') options.split = {}; if (!options.split.prepend) options.split.prepend = prepend; } From c96d5ad30ef1d9f183fbf5a8a7e877d7d7361cf3 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Tue, 25 Oct 2016 19:01:56 -0400 Subject: [PATCH 160/188] Optimise everyone/here replacing --- src/client/rest/RESTMethods.js | 2 +- src/structures/Message.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index a2bf2800b..7cc0abde2 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -59,7 +59,7 @@ class RESTMethods { if (content) { if (disableEveryone || (typeof disableEveryone === 'undefined' && this.rest.client.options.disableEveryone)) { - content = content.replace('@everyone', '@\u200beveryone').replace('@here', '@\u200bhere'); + content = content.replace(/@(everyone|here)/g, '@\u200b$1'); } if (split) content = splitMessage(content, typeof split === 'object' ? split : {}); diff --git a/src/structures/Message.js b/src/structures/Message.js index 6b0ae77c3..e9e093ac5 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -236,8 +236,7 @@ class Message { */ get cleanContent() { return this.content - .replace(/@everyone/g, '@\u200Beveryone') - .replace(/@here/g, '@\u200Bhere') + .replace(/@(everyone|here)/g, '@\u200b$1') .replace(/<@!?[0-9]+>/g, (input) => { const id = input.replace(/<|!|>|@/g, ''); if (this.channel.type === 'dm' || this.channel.type === 'group') { From a04094f0ff648dc12997c5dd13132fcc3ce2a161 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Tue, 25 Oct 2016 19:59:22 -0400 Subject: [PATCH 161/188] Rename VoiceConnection.disconnected event -> disconnect --- src/client/voice/ClientVoiceManager.js | 2 +- src/client/voice/VoiceConnection.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/client/voice/ClientVoiceManager.js b/src/client/voice/ClientVoiceManager.js index 6a572edf1..97cef5288 100644 --- a/src/client/voice/ClientVoiceManager.js +++ b/src/client/voice/ClientVoiceManager.js @@ -243,7 +243,7 @@ class ClientVoiceManager { this.connections.set(channel.guild.id, voiceConnection); voiceConnection.once('ready', () => resolve(voiceConnection)); voiceConnection.once('error', reject); - voiceConnection.once('disconnected', () => this.connections.delete(channel.guild.id)); + voiceConnection.once('disconnect', () => this.connections.delete(channel.guild.id)); }); }); } diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index d3fc2149f..be3fe798f 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -104,7 +104,7 @@ class VoiceConnection extends EventEmitter { } /** - * Disconnect the voice connection, causing a disconnected and closing event to be emitted. + * Disconnect the voice connection, causing a disconnect and closing event to be emitted. */ disconnect() { this.emit('closing'); @@ -119,9 +119,9 @@ class VoiceConnection extends EventEmitter { }); /** * Emitted when the voice connection disconnects - * @event VoiceConnection#disconnected + * @event VoiceConnection#disconnect */ - this.emit('disconnected'); + this.emit('disconnect'); } /** From d1e9d15a1c29301c615c4718db35a8394b0aa2bb Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Tue, 25 Oct 2016 20:26:57 -0400 Subject: [PATCH 162/188] Clean up a bunch of new voice stuff --- src/client/voice/ClientVoiceManager.js | 39 ++++++++----------- src/client/voice/VoiceConnection.js | 9 +---- src/client/voice/VoiceUDPClient.js | 34 +++++++--------- src/client/voice/VoiceWebSocket.js | 23 +++++------ src/client/voice/pcm/FfmpegConverterEngine.js | 1 - src/client/voice/player/AudioPlayer.js | 13 +++---- src/client/voice/player/BasePlayer.js | 3 +- src/client/voice/receiver/VoiceReceiver.js | 7 +++- src/client/voice/util/SecretKey.js | 4 +- 9 files changed, 57 insertions(+), 76 deletions(-) diff --git a/src/client/voice/ClientVoiceManager.js b/src/client/voice/ClientVoiceManager.js index 97cef5288..06cc44941 100644 --- a/src/client/voice/ClientVoiceManager.js +++ b/src/client/voice/ClientVoiceManager.js @@ -11,22 +11,26 @@ const EventEmitter = require('events').EventEmitter; class PendingVoiceConnection extends EventEmitter { constructor(voiceManager, channel) { super(); + /** * The ClientVoiceManager that instantiated this pending connection * @type {ClientVoiceManager} */ this.voiceManager = voiceManager; + /** * The channel that this pending voice connection will attempt to join * @type {VoiceChannel} */ this.channel = channel; + /** * The timeout that will be invoked after 15 seconds signifying a failure to connect * @type {Timeout} */ this.deathTimer = this.voiceManager.client.setTimeout( - () => this.fail(new Error('Automatic failure after 15 seconds')), 15000); + () => this.fail(new Error('Connection not established within 15 seconds.')), 15000); + /** * An object containing data required to connect to the voice servers with * @type {object} @@ -53,26 +57,26 @@ class PendingVoiceConnection extends EventEmitter { */ setTokenAndEndpoint(token, endpoint) { if (!token) { - this.fail(new Error('Token not provided from voice server packet')); + this.fail(new Error('Token not provided from voice server packet.')); return; } if (!endpoint) { - this.fail(new Error('Endpoint not provided from voice server packet')); + this.fail(new Error('Endpoint not provided from voice server packet.')); return; } if (this.data.token) { - this.fail(new Error('There is already a registered token for this connection')); + this.fail(new Error('There is already a registered token for this connection.')); return; } if (this.data.endpoint) { - this.fail(new Error('There is already a registered endpoint for this connection')); + this.fail(new Error('There is already a registered endpoint for this connection.')); return; } endpoint = endpoint.match(/([^:]*)/)[0]; if (!endpoint) { - this.fail(new Error('failed to find an endpoint')); + this.fail(new Error('Failed to find an endpoint.')); return; } @@ -88,11 +92,11 @@ class PendingVoiceConnection extends EventEmitter { */ setSessionID(sessionID) { if (!sessionID) { - this.fail(new Error('Session ID not supplied')); + this.fail(new Error('Session ID not supplied.')); return; } if (this.data.session_id) { - this.fail(new Error('There is already a registered session ID for this connection')); + this.fail(new Error('There is already a registered session ID for this connection.')); return; } this.data.session_id = sessionID; @@ -161,15 +165,11 @@ class ClientVoiceManager { } onVoiceServer(data) { - if (this.pending.has(data.guild_id)) { - this.pending.get(data.guild_id).setTokenAndEndpoint(data.token, data.endpoint); - } + if (this.pending.has(data.guild_id)) this.pending.get(data.guild_id).setTokenAndEndpoint(data.token, data.endpoint); } onVoiceStateUpdate(data) { - if (this.pending.has(data.guild_id)) { - this.pending.get(data.guild_id).setSessionID(data.session_id); - } + if (this.pending.has(data.guild_id)) this.pending.get(data.guild_id).setSessionID(data.session_id); } /** @@ -178,15 +178,13 @@ class ClientVoiceManager { * @param {Object} [options] The options to provide */ sendVoiceStateUpdate(channel, options = {}) { - if (!this.client.user) { - throw new Error('You cannot join because there is no client user'); - } + if (!this.client.user) throw new Error('Unable to join because there is no client user.'); if (channel.permissionsFor) { const permissions = channel.permissionsFor(this.client.user); if (permissions) { if (!permissions.hasPermission('CONNECT')) { - throw new Error('You do not have permission to connect to this voice channel'); + throw new Error('You do not have permission to connect to this voice channel.'); } } else { throw new Error('There is no permission set for the client user in this channel - are they part of the guild?'); @@ -215,10 +213,7 @@ class ClientVoiceManager { */ joinChannel(channel) { return new Promise((resolve, reject) => { - // if already connecting to this voice server, error - if (this.pending.get(channel.guild.id)) { - throw new Error(`Already connecting to this guild's voice server.`); - } + if (this.pending.get(channel.guild.id)) throw new Error('Already connecting to this guild\'s voice server.'); const existingConnection = this.connections.get(channel.guild.id); if (existingConnection) { diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index be3fe798f..c6188ffc7 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -129,12 +129,8 @@ class VoiceConnection extends EventEmitter { * @private */ connect() { - if (this.sockets.ws) { - throw new Error('There is already an existing WebSocket connection!'); - } - if (this.sockets.udp) { - throw new Error('There is already an existing UDP connection!'); - } + if (this.sockets.ws) throw new Error('There is already an existing WebSocket connection.'); + if (this.sockets.udp) throw new Error('There is already an existing UDP connection.'); this.sockets.ws = new VoiceWebSocket(this); this.sockets.udp = new VoiceUDP(this); this.sockets.ws.on('error', e => this.emit('error', e)); @@ -260,7 +256,6 @@ class VoiceConnection extends EventEmitter { this.receivers.push(receiver); return receiver; } - } module.exports = VoiceConnection; diff --git a/src/client/voice/VoiceUDPClient.js b/src/client/voice/VoiceUDPClient.js index 3a13b675a..d0e7e7bec 100644 --- a/src/client/voice/VoiceUDPClient.js +++ b/src/client/voice/VoiceUDPClient.js @@ -7,9 +7,7 @@ function parseLocalPacket(message) { try { const packet = new Buffer(message); let address = ''; - for (let i = 4; i < packet.indexOf(0, i); i++) { - address += String.fromCharCode(packet[i]); - } + for (let i = 4; i < packet.indexOf(0, i); i++) address += String.fromCharCode(packet[i]); const port = parseInt(packet.readUIntLE(packet.length - 2, 2).toString(10), 10); return { address, port }; } catch (error) { @@ -24,33 +22,40 @@ function parseLocalPacket(message) { class VoiceConnectionUDPClient extends EventEmitter { constructor(voiceConnection) { super(); + /** * The voice connection that this UDP client serves * @type {VoiceConnection} */ this.voiceConnection = voiceConnection; + /** * The UDP socket * @type {?Socket} */ this.socket = null; + /** * The address of the discord voice server * @type {?string} */ this.discordAddress = null; + /** * The local IP address * @type {?string} */ this.localAddress = null; + /** * The local port * @type {?string} */ this.localPort = null; + this.voiceConnection.on('closing', this.shutdown.bind(this)); } + shutdown() { if (this.socket) { try { @@ -61,6 +66,7 @@ class VoiceConnectionUDPClient extends EventEmitter { this.socket = null; } } + /** * The port of the discord voice server * @type {number} @@ -69,6 +75,7 @@ class VoiceConnectionUDPClient extends EventEmitter { get discordPort() { return this.voiceConnection.authentication.port; } + /** * Tries to resolve the voice server endpoint to an address * @returns {Promise} @@ -93,22 +100,11 @@ class VoiceConnectionUDPClient extends EventEmitter { */ send(packet) { return new Promise((resolve, reject) => { - if (this.socket) { - if (!this.discordAddress || !this.discordPort) { - reject(new Error('malformed UDP address or port')); - return; - } - // console.log('sendin', packet); - this.socket.send(packet, 0, packet.length, this.discordPort, this.discordAddress, error => { - if (error) { - reject(error); - } else { - resolve(packet); - } - }); - } else { - reject(new Error('tried to send a UDP packet but there is no socket available')); - } + if (!this.socket) throw new Error('Tried to send a UDP packet, but there is no socket available.'); + if (!this.discordAddress || !this.discordPort) throw new Error('Malformed UDP address or port.'); + this.socket.send(packet, 0, packet.length, this.discordPort, this.discordAddress, error => { + if (error) reject(error); else resolve(packet); + }); }); } diff --git a/src/client/voice/VoiceWebSocket.js b/src/client/voice/VoiceWebSocket.js index 290dbf8ea..1c3cef6fc 100644 --- a/src/client/voice/VoiceWebSocket.js +++ b/src/client/voice/VoiceWebSocket.js @@ -11,20 +11,21 @@ const EventEmitter = require('events').EventEmitter; class VoiceWebSocket extends EventEmitter { constructor(voiceConnection) { super(); + /** * The Voice Connection that this WebSocket serves * @type {VoiceConnection} */ this.voiceConnection = voiceConnection; + /** * How many connection attempts have been made * @type {number} */ this.attempts = 0; + this.connect(); - this.dead = false; - this.voiceConnection.on('closing', this.shutdown.bind(this)); } @@ -47,9 +48,7 @@ class VoiceWebSocket extends EventEmitter { */ reset() { if (this.ws) { - if (this.ws.readyState !== WebSocket.CLOSED) { - this.ws.close(); - } + if (this.ws.readyState !== WebSocket.CLOSED) this.ws.close(); this.ws = null; } this.clearHeartbeat(); @@ -59,17 +58,15 @@ class VoiceWebSocket extends EventEmitter { * Starts connecting to the Voice WebSocket Server. */ connect() { - if (this.dead) { - return; - } - if (this.ws) { - this.reset(); - } + if (this.dead) return; + if (this.ws) this.reset(); if (this.attempts > 5) { this.emit('error', new Error(`too many connection attempts (${this.attempts})`)); return; } + this.attempts++; + /** * The actual WebSocket used to connect to the Voice WebSocket Server. * @type {WebSocket} @@ -97,7 +94,7 @@ class VoiceWebSocket extends EventEmitter { } }); } else { - reject(new Error(`voice websocket not open to send ${data}`)); + reject(new Error(`Voice websocket not open to send ${data}.`)); } }); } @@ -150,7 +147,7 @@ class VoiceWebSocket extends EventEmitter { * Called whenever the connection to the WebSocket Server is lost */ onClose() { - // #todo see if the connection is open before reconnecting + // TODO see if the connection is open before reconnecting if (!this.dead) this.client.setTimeout(this.connect.bind(this), this.attempts * 1000); } diff --git a/src/client/voice/pcm/FfmpegConverterEngine.js b/src/client/voice/pcm/FfmpegConverterEngine.js index e49798ed8..34c5d509a 100644 --- a/src/client/voice/pcm/FfmpegConverterEngine.js +++ b/src/client/voice/pcm/FfmpegConverterEngine.js @@ -3,7 +3,6 @@ const ChildProcess = require('child_process'); const EventEmitter = require('events').EventEmitter; class PCMConversionProcess extends EventEmitter { - constructor(process) { super(); this.process = process; diff --git a/src/client/voice/player/AudioPlayer.js b/src/client/voice/player/AudioPlayer.js index dc7e3b8c9..b5c338675 100644 --- a/src/client/voice/player/AudioPlayer.js +++ b/src/client/voice/player/AudioPlayer.js @@ -4,7 +4,6 @@ const EventEmitter = require('events').EventEmitter; const StreamDispatcher = require('../dispatcher/StreamDispatcher'); class AudioPlayer extends EventEmitter { - constructor(voiceConnection) { super(); this.voiceConnection = voiceConnection; @@ -20,13 +19,13 @@ class AudioPlayer extends EventEmitter { timestamp: 0, pausedTime: 0, }; - this.voiceConnection.on('closing', () => this.cleanup(null, 'voice connection is closing')); + this.voiceConnection.on('closing', () => this.cleanup(null, 'voice connection closing')); } playUnknownStream(stream, { seek = 0, volume = 1, passes = 1 } = {}) { const options = { seek, volume, passes }; stream.on('end', () => { - this.emit('debug', 'input stream to converter has ended'); + this.emit('debug', 'Input stream to converter has ended'); }); stream.on('error', e => this.emit('error', e)); const conversionProcess = this.audioToPCM.createConvertStream(options.seek); @@ -37,7 +36,7 @@ class AudioPlayer extends EventEmitter { cleanup(checkStream, reason) { // cleanup is a lot less aggressive than v9 because it doesn't try to kill every single stream it is aware of - this.emit('debug', `clean up triggered due to ${reason}`); + this.emit('debug', `Clean up triggered due to ${reason}`); const filter = checkStream && this.dispatcher && this.dispatcher.stream === checkStream; if (this.currentConverter && (checkStream ? filter : true)) { this.currentConverter.destroy(); @@ -47,7 +46,7 @@ class AudioPlayer extends EventEmitter { playPCMStream(stream, converter, { seek = 0, volume = 1, passes = 1 } = {}) { const options = { seek, volume, passes }; - stream.on('end', () => this.emit('debug', 'pcm input stream ended')); + stream.on('end', () => this.emit('debug', 'PCM input stream ended')); this.cleanup(null, 'outstanding play stream'); this.currentConverter = converter; if (this.dispatcher) { @@ -56,10 +55,10 @@ class AudioPlayer extends EventEmitter { stream.on('error', e => this.emit('error', e)); const dispatcher = new StreamDispatcher(this, stream, this.streamingData, options); dispatcher.on('error', e => this.emit('error', e)); - dispatcher.on('end', () => this.cleanup(dispatcher.stream, 'disp ended')); + dispatcher.on('end', () => this.cleanup(dispatcher.stream, 'dispatcher ended')); dispatcher.on('speaking', value => this.voiceConnection.setSpeaking(value)); this.dispatcher = dispatcher; - dispatcher.on('debug', m => this.emit('debug', `stream dispatch - ${m}`)); + dispatcher.on('debug', m => this.emit('debug', `Stream dispatch - ${m}`)); return dispatcher; } diff --git a/src/client/voice/player/BasePlayer.js b/src/client/voice/player/BasePlayer.js index a38e4906d..d5285cd34 100644 --- a/src/client/voice/player/BasePlayer.js +++ b/src/client/voice/player/BasePlayer.js @@ -101,8 +101,7 @@ class VoiceConnectionPlayer extends EventEmitter { speaking: true, delay: 0, }, - }) - .catch(e => { + }).catch(e => { this.emit('debug', e); }); } diff --git a/src/client/voice/receiver/VoiceReceiver.js b/src/client/voice/receiver/VoiceReceiver.js index cf7582e50..e27ad8d1a 100644 --- a/src/client/voice/receiver/VoiceReceiver.js +++ b/src/client/voice/receiver/VoiceReceiver.js @@ -25,17 +25,20 @@ class VoiceReceiver extends EventEmitter { this.queues = new Map(); this.pcmStreams = new Map(); this.opusStreams = new Map(); + /** * Whether or not this receiver has been destroyed. * @type {boolean} */ this.destroyed = false; + /** * The VoiceConnection that instantiated this * @type {VoiceConnection} */ this.voiceConnection = connection; - this._listener = (msg => { + + this._listener = msg => { const ssrc = +msg.readUInt32BE(8).toString(10); const user = this.voiceConnection.ssrcMap.get(ssrc); if (!user) { @@ -50,7 +53,7 @@ class VoiceReceiver extends EventEmitter { } this.handlePacket(msg, user); } - }).bind(this); + }; this.voiceConnection.sockets.udp.socket.on('message', this._listener); } diff --git a/src/client/voice/util/SecretKey.js b/src/client/voice/util/SecretKey.js index 5e1df7a99..42a0da0cb 100644 --- a/src/client/voice/util/SecretKey.js +++ b/src/client/voice/util/SecretKey.js @@ -8,9 +8,7 @@ class SecretKey { * @type {Uint8Array} */ this.key = new Uint8Array(new ArrayBuffer(key.length)); - for (const index in key) { - this.key[index] = key[index]; - } + for (const index in key) this.key[index] = key[index]; } } From b2a4545c16e34a0625715d9847acd40bd078a745 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Tue, 25 Oct 2016 20:34:57 -0400 Subject: [PATCH 163/188] Clean up more voice stuff --- src/client/voice/ClientVoiceManager.js | 216 ++++++++++++------------- src/client/voice/VoiceWebSocket.js | 34 ++-- 2 files changed, 122 insertions(+), 128 deletions(-) diff --git a/src/client/voice/ClientVoiceManager.js b/src/client/voice/ClientVoiceManager.js index 06cc44941..ee088d8e3 100644 --- a/src/client/voice/ClientVoiceManager.js +++ b/src/client/voice/ClientVoiceManager.js @@ -4,6 +4,114 @@ const Constants = require('../../util/Constants'); const VoiceConnection = require('./VoiceConnection'); const EventEmitter = require('events').EventEmitter; +/** + * Manages all the voice stuff for the Client + * @private + */ +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(); + + this.client.on('self.voiceServer', this.onVoiceServer.bind(this)); + this.client.on('self.voiceStateUpdate', this.onVoiceStateUpdate.bind(this)); + } + + onVoiceServer(data) { + if (this.pending.has(data.guild_id)) this.pending.get(data.guild_id).setTokenAndEndpoint(data.token, data.endpoint); + } + + onVoiceStateUpdate(data) { + if (this.pending.has(data.guild_id)) this.pending.get(data.guild_id).setSessionID(data.session_id); + } + + /** + * 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 + */ + sendVoiceStateUpdate(channel, options = {}) { + if (!this.client.user) throw new Error('Unable to join because there is no client user.'); + + if (channel.permissionsFor) { + const permissions = channel.permissionsFor(this.client.user); + if (permissions) { + if (!permissions.hasPermission('CONNECT')) { + throw new Error('You do not have permission to connect to this voice channel.'); + } + } else { + throw new Error('There is no permission set for the client user in this channel - are they part of the guild?'); + } + } else { + throw new Error('Channel does not support permissionsFor; is it really a voice channel?'); + } + + 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 {Promise} + */ + joinChannel(channel) { + return new Promise((resolve, reject) => { + if (this.pending.get(channel.guild.id)) throw new Error('Already connecting to this guild\'s voice server.'); + + const existingConnection = this.connections.get(channel.guild.id); + if (existingConnection) { + if (existingConnection.channel.id !== channel.id) { + this.sendVoiceStateUpdate(channel); + this.connections.get(channel.guild.id).channel = channel; + } + resolve(existingConnection); + return; + } + + const pendingConnection = new PendingVoiceConnection(this, channel); + this.pending.set(channel.guild.id, pendingConnection); + + pendingConnection.on('fail', reason => { + this.pending.delete(channel.guild.id); + reject(reason); + }); + + pendingConnection.on('pass', voiceConnection => { + this.pending.delete(channel.guild.id); + this.connections.set(channel.guild.id, voiceConnection); + voiceConnection.once('ready', () => resolve(voiceConnection)); + voiceConnection.once('error', reject); + voiceConnection.once('disconnect', () => this.connections.delete(channel.guild.id)); + }); + }); + } +} + /** * Represents a Pending Voice Connection * @private @@ -136,112 +244,4 @@ class PendingVoiceConnection extends EventEmitter { } } -/** - * Manages all the voice stuff for the Client - * @private - */ -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(); - - this.client.on('self.voiceServer', this.onVoiceServer.bind(this)); - this.client.on('self.voiceStateUpdate', this.onVoiceStateUpdate.bind(this)); - } - - onVoiceServer(data) { - if (this.pending.has(data.guild_id)) this.pending.get(data.guild_id).setTokenAndEndpoint(data.token, data.endpoint); - } - - onVoiceStateUpdate(data) { - if (this.pending.has(data.guild_id)) this.pending.get(data.guild_id).setSessionID(data.session_id); - } - - /** - * 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 - */ - sendVoiceStateUpdate(channel, options = {}) { - if (!this.client.user) throw new Error('Unable to join because there is no client user.'); - - if (channel.permissionsFor) { - const permissions = channel.permissionsFor(this.client.user); - if (permissions) { - if (!permissions.hasPermission('CONNECT')) { - throw new Error('You do not have permission to connect to this voice channel.'); - } - } else { - throw new Error('There is no permission set for the client user in this channel - are they part of the guild?'); - } - } else { - throw new Error('Channel does not support permissionsFor; is it really a voice channel?'); - } - - 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 {Promise} - */ - joinChannel(channel) { - return new Promise((resolve, reject) => { - if (this.pending.get(channel.guild.id)) throw new Error('Already connecting to this guild\'s voice server.'); - - const existingConnection = this.connections.get(channel.guild.id); - if (existingConnection) { - if (existingConnection.channel.id !== channel.id) { - this.sendVoiceStateUpdate(channel); - this.connections.get(channel.guild.id).channel = channel; - } - resolve(existingConnection); - return; - } - - const pendingConnection = new PendingVoiceConnection(this, channel); - this.pending.set(channel.guild.id, pendingConnection); - - pendingConnection.on('fail', reason => { - this.pending.delete(channel.guild.id); - reject(reason); - }); - - pendingConnection.on('pass', voiceConnection => { - this.pending.delete(channel.guild.id); - this.connections.set(channel.guild.id, voiceConnection); - voiceConnection.once('ready', () => resolve(voiceConnection)); - voiceConnection.once('error', reject); - voiceConnection.once('disconnect', () => this.connections.delete(channel.guild.id)); - }); - }); - } -} - module.exports = ClientVoiceManager; diff --git a/src/client/voice/VoiceWebSocket.js b/src/client/voice/VoiceWebSocket.js index 1c3cef6fc..1c421a71b 100644 --- a/src/client/voice/VoiceWebSocket.js +++ b/src/client/voice/VoiceWebSocket.js @@ -61,7 +61,7 @@ class VoiceWebSocket extends EventEmitter { if (this.dead) return; if (this.ws) this.reset(); if (this.attempts > 5) { - this.emit('error', new Error(`too many connection attempts (${this.attempts})`)); + this.emit('error', new Error(`Too many connection attempts (${this.attempts}).`)); return; } @@ -85,17 +85,12 @@ class VoiceWebSocket extends EventEmitter { */ send(data) { return new Promise((resolve, reject) => { - if (this.ws && this.ws.readyState === WebSocket.OPEN) { - this.ws.send(data, null, error => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - } else { - reject(new Error(`Voice websocket not open to send ${data}.`)); + if (!this.ws || this.ws.readyState !== WebSocket.OPEN) { + throw new Error(`Voice websocket not open to send ${data}.`); } + this.ws.send(data, null, error => { + if (error) reject(error); else resolve(data); + }); }); } @@ -126,7 +121,7 @@ class VoiceWebSocket extends EventEmitter { session_id: this.voiceConnection.authentication.session_id, }, }).catch(() => { - this.emit('error', new Error('tried to send join packet but WebSocket not open')); + this.emit('error', new Error('Tried to send join packet, but the WebSocket is not open.')); }); } @@ -208,7 +203,7 @@ class VoiceWebSocket extends EventEmitter { */ setHeartbeat(interval) { if (!interval || isNaN(interval)) { - this.onError(new Error('tried to set voice heartbeat but no valid interval was specified')); + this.onError(new Error('Tried to set voice heartbeat but no valid interval was specified.')); return; } if (this.heartbeatInterval) { @@ -217,7 +212,7 @@ class VoiceWebSocket extends EventEmitter { * @param {string} warn the warning * @event VoiceWebSocket#warn */ - this.emit('warn', 'a voice heartbeat interval is being overwritten'); + this.emit('warn', 'A voice heartbeat interval is being overwritten'); clearInterval(this.heartbeatInterval); } this.heartbeatInterval = this.client.setInterval(this.sendHeartbeat.bind(this), interval); @@ -228,7 +223,7 @@ class VoiceWebSocket extends EventEmitter { */ clearHeartbeat() { if (!this.heartbeatInterval) { - this.emit('warn', 'tried to clear a heartbeat interval that does not exist'); + this.emit('warn', 'Tried to clear a heartbeat interval that does not exist'); return; } clearInterval(this.heartbeatInterval); @@ -239,11 +234,10 @@ class VoiceWebSocket extends EventEmitter { * Sends a heartbeat packet */ sendHeartbeat() { - this.sendPacket({ op: Constants.VoiceOPCodes.HEARTBEAT, d: null }) - .catch(() => { - this.emit('warn', 'tried to send heartbeat, but connection is not open'); - this.clearHeartbeat(); - }); + this.sendPacket({ op: Constants.VoiceOPCodes.HEARTBEAT, d: null }).catch(() => { + this.emit('warn', 'Tried to send heartbeat, but connection is not open'); + this.clearHeartbeat(); + }); } } From 05f73c3edfe9f856db431f1b3893593ae2dfb0fb Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Tue, 25 Oct 2016 20:41:23 -0400 Subject: [PATCH 164/188] Clean up voice channel join permissions check --- src/client/voice/ClientVoiceManager.js | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/client/voice/ClientVoiceManager.js b/src/client/voice/ClientVoiceManager.js index ee088d8e3..eea0dc8a8 100644 --- a/src/client/voice/ClientVoiceManager.js +++ b/src/client/voice/ClientVoiceManager.js @@ -47,19 +47,16 @@ class ClientVoiceManager { */ sendVoiceStateUpdate(channel, options = {}) { if (!this.client.user) throw new Error('Unable to join because there is no client user.'); - - if (channel.permissionsFor) { - const permissions = channel.permissionsFor(this.client.user); - if (permissions) { - if (!permissions.hasPermission('CONNECT')) { - throw new Error('You do not have permission to connect to this voice channel.'); - } - } else { - throw new Error('There is no permission set for the client user in this channel - are they part of the guild?'); - } - } else { + if (!channel.permissionsFor) { throw new Error('Channel does not support permissionsFor; is it really a voice channel?'); } + const permissions = channel.permissionsFor(this.client.user); + if (!permissions) { + throw new Error('There is no permission set for the client user in this channel - are they part of the guild?'); + } + if (!permissions.hasPermission('CONNECT')) { + throw new Error('You do not have permission to connect to this voice channel.'); + } options = mergeDefault({ guild_id: channel.guild.id, From 0c4a4023cef4ee37f521980277307d96fdc64520 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 26 Oct 2016 14:19:36 +0100 Subject: [PATCH 165/188] Fix setting guild role positions (#751) --- src/client/actions/ActionsManager.js | 1 + .../actions/GuildRolesPositionUpdate.js | 30 +++++++++++++++++++ src/client/rest/RESTMethods.js | 13 ++++++++ src/structures/Guild.js | 26 ++++++++++++++++ src/structures/Role.js | 2 +- test/random.js | 2 +- 6 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 src/client/actions/GuildRolesPositionUpdate.js diff --git a/src/client/actions/ActionsManager.js b/src/client/actions/ActionsManager.js index 331d8ce2a..024db857c 100644 --- a/src/client/actions/ActionsManager.js +++ b/src/client/actions/ActionsManager.js @@ -23,6 +23,7 @@ class ActionsManager { this.register('GuildEmojiCreate'); this.register('GuildEmojiDelete'); this.register('GuildEmojiUpdate'); + this.register('GuildRolesPositionUpdate'); } register(name) { diff --git a/src/client/actions/GuildRolesPositionUpdate.js b/src/client/actions/GuildRolesPositionUpdate.js new file mode 100644 index 000000000..46530b596 --- /dev/null +++ b/src/client/actions/GuildRolesPositionUpdate.js @@ -0,0 +1,30 @@ +const Action = require('./Action'); + +class GuildRolesPositionUpdate extends Action { + handle(data) { + const client = this.client; + + const guild = client.guilds.get(data.guild_id); + if (guild) { + for (const partialRole of data.roles) { + const role = guild.roles.get(partialRole.id); + if (role) { + role.position = partialRole.position; + } + } + } + + return { + guild, + }; + } +} + +/** + * 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 = GuildRolesPositionUpdate; diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index a2bf2800b..371647403 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -677,6 +677,19 @@ class RESTMethods { }).catch(reject); }); } + + setRolePositions(guildID, roles) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('patch', Constants.Endpoints.guildRoles(guildID), true, roles) + .then(() => { + resolve(this.rest.client.actions.GuildRolesPositionUpdate.handle({ + guild_id: guildID, + roles, + }).guild); + }) + .catch(reject); + }); + } } module.exports = RESTMethods; diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 7c7fcd4a9..d9c7f6ed9 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -630,6 +630,32 @@ class Guild { return this.client.rest.methods.deleteGuild(this); } + /** + * Set the position of a role in this guild + * @param {string|Role} role the role to edit, can be a role object or a role ID. + * @param {number} position the new position of the role + * @returns {Promise} + */ + setRolePosition(role, position) { + if (role instanceof Role) { + role = role.id; + } else if (typeof role !== 'string') { + return Promise.reject(new Error('Supplied role is not a role or string')); + } + + position = Number(position); + if (isNaN(position)) { + return Promise.reject(new Error('Supplied position is not a number')); + } + + const updatedRoles = this.roles.array().map(r => ({ + id: r.id, + position: r.id === role ? position : (r.position < position ? r.position : r.position + 1), + })); + + return this.client.rest.methods.setRolePositions(this.id, updatedRoles); + } + /** * Whether this Guild equals another Guild. It compares all properties, so for most operations * it is advisable to just compare `guild.id === guild2.id` as it is much faster and is often diff --git a/src/structures/Role.js b/src/structures/Role.js index f2a52ac87..4bbb6c55b 100644 --- a/src/structures/Role.js +++ b/src/structures/Role.js @@ -230,7 +230,7 @@ class Role { * .catch(console.error); */ setPosition(position) { - return this.client.rest.methods.updateGuildRole(this, { position }); + return this.guild.setRolePosition(this, position); } /** diff --git a/test/random.js b/test/random.js index 502c43456..efc8662f6 100644 --- a/test/random.js +++ b/test/random.js @@ -8,7 +8,7 @@ const client = new Discord.Client({ fetchAllMembers: false, apiRequestMethod: 's const { email, password, token, usertoken, song } = require('./auth.json'); -client.login(usertoken).then(atoken => console.log('logged in with token ' + atoken)).catch(console.error); +client.login(token).then(atoken => console.log('logged in with token ' + atoken)).catch(console.error); client.ws.on('send', console.log); From 26de908cfd281cbd5935d7db17fbce431bbfac60 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 26 Oct 2016 14:44:19 +0100 Subject: [PATCH 166/188] some voice docs --- src/client/voice/player/AudioPlayer.js | 13 +++++++++++++ test/random.js | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/client/voice/player/AudioPlayer.js b/src/client/voice/player/AudioPlayer.js index b5c338675..96c6c24ae 100644 --- a/src/client/voice/player/AudioPlayer.js +++ b/src/client/voice/player/AudioPlayer.js @@ -3,13 +3,26 @@ const OpusEncoders = require('../opus/OpusEngineList'); const EventEmitter = require('events').EventEmitter; const StreamDispatcher = require('../dispatcher/StreamDispatcher'); +/** + * Represents the Audio Player of a Voice Connection + * @extends {EventEmitter} + * @private + */ class AudioPlayer extends EventEmitter { constructor(voiceConnection) { super(); + /** + * The voice connection the player belongs to + * @type {VoiceConnection} + */ this.voiceConnection = voiceConnection; this.audioToPCM = new (PCMConverters.fetch())(); this.opusEncoder = OpusEncoders.fetch(); this.currentConverter = null; + /** + * The current stream dispatcher, if a stream is being played + * @type {StreamDispatcher} + */ this.dispatcher = null; this.audioToPCM.on('error', e => this.emit('error', e)); this.streamingData = { diff --git a/test/random.js b/test/random.js index efc8662f6..0c9776ee4 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({ fetchAllMembers: false, apiRequestMethod: 'sequential' }); +const client = new Discord.Client({ fetchAllMembers: false, apiRequestMethod: 'burst' }); const { email, password, token, usertoken, song } = require('./auth.json'); From e9fa8a438ca586436ff3332deb08338cc0e636f6 Mon Sep 17 00:00:00 2001 From: isonmad Date: Wed, 26 Oct 2016 09:49:45 -0400 Subject: [PATCH 167/188] fix Client.destroy bugs (#828) * add test for Client.destroy() * propagate errors in ClientManager.destroy If the promise returned by logout() rejects, previously it would be completely uncaught, and just return an eternally pending promise that never resolved. * fix RESTMethods.logout Without a data argument, the POST that superagent sends causes the discord server to reply with a HTTP 400 error: text: '{"Content-Type": "Expected Content-Type to be one of set([\'application/json\'])."}', * fix Client.destroy _timeouts and _intervals were changed to Set objects in commit 6ede7a32fd29bd44e65e344e1f102332d30c2129 a month ago. Changing them to arrays causes failures if you try to reuse the client object again. * always close websocket in ClientManager.destroy Invoking logout does not implicitly cause the server to close the websocket for you, so cleanup everything. Otherwise the websocket being open keeps node alive and hanging mysteriously until the connection hits a timeout. * fix indentation for eslint --- src/client/Client.js | 19 ++++++++----------- src/client/ClientManager.js | 13 +++++-------- src/client/rest/RESTMethods.js | 2 +- test/destroy.js | 12 ++++++++++++ 4 files changed, 26 insertions(+), 20 deletions(-) create mode 100644 test/destroy.js diff --git a/src/client/Client.js b/src/client/Client.js index 58e7f595f..f81c72954 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -234,17 +234,14 @@ class Client extends EventEmitter { * @returns {Promise} */ destroy() { - return new Promise((resolve, reject) => { - this.manager.destroy().then(() => { - for (const t of this._timeouts) clearTimeout(t); - for (const i of this._intervals) clearInterval(i); - this._timeouts = []; - this._intervals = []; - this.token = null; - this.email = null; - this.password = null; - resolve(); - }).catch(reject); + return this.manager.destroy().then(() => { + for (const t of this._timeouts) clearTimeout(t); + for (const i of this._intervals) clearInterval(i); + this._timeouts.clear(); + this._intervals.clear(); + this.token = null; + this.email = null; + this.password = null; }); } diff --git a/src/client/ClientManager.js b/src/client/ClientManager.js index 89acc523a..5e2a42b04 100644 --- a/src/client/ClientManager.js +++ b/src/client/ClientManager.js @@ -58,14 +58,11 @@ class ClientManager { } destroy() { - return new Promise((resolve) => { - if (!this.client.user.bot) { - this.client.rest.methods.logout().then(resolve); - } else { - this.client.ws.destroy(); - resolve(); - } - }); + let p = Promise.resolve(); + if (!this.client.user.bot) { + p = this.client.rest.methods.logout(); + } + return p.then(() => this.client.ws.destroy()); } } diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 2bded4206..380a7b714 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -35,7 +35,7 @@ class RESTMethods { } logout() { - return this.rest.makeRequest('post', Constants.Endpoints.logout, true); + return this.rest.makeRequest('post', Constants.Endpoints.logout, true, {}); } getGateway() { diff --git a/test/destroy.js b/test/destroy.js new file mode 100644 index 000000000..08f934de0 --- /dev/null +++ b/test/destroy.js @@ -0,0 +1,12 @@ +'use strict'; + +const Discord = require('../'); + +const client = new Discord.Client({ fetch_all_members: false, api_request_method: 'sequential' }); + +const { email, password, token } = require('./auth.json'); + +let p = client.login(token); +p = p.then(() => client.destroy()); +p = p.then(() => client.login(token)); +p = p.then(() => client.destroy()); From e7e8a802b845ad6459a2dcb126a736f5934b2839 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 26 Oct 2016 15:14:28 +0100 Subject: [PATCH 168/188] Fix docs --- src/client/actions/GuildRolesPositionUpdate.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/client/actions/GuildRolesPositionUpdate.js b/src/client/actions/GuildRolesPositionUpdate.js index 46530b596..701118604 100644 --- a/src/client/actions/GuildRolesPositionUpdate.js +++ b/src/client/actions/GuildRolesPositionUpdate.js @@ -20,11 +20,4 @@ class GuildRolesPositionUpdate 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 = GuildRolesPositionUpdate; From 45632b2eae6791dadf1456f4ee0bc05888def12c Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 26 Oct 2016 15:23:54 +0100 Subject: [PATCH 169/188] fix joining voice channels without perms --- src/client/voice/ClientVoiceManager.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/client/voice/ClientVoiceManager.js b/src/client/voice/ClientVoiceManager.js index eea0dc8a8..bd58989ee 100644 --- a/src/client/voice/ClientVoiceManager.js +++ b/src/client/voice/ClientVoiceManager.js @@ -80,6 +80,10 @@ class ClientVoiceManager { return new Promise((resolve, reject) => { if (this.pending.get(channel.guild.id)) throw new Error('Already connecting to this guild\'s voice server.'); + if (!channel.permissionsFor(this.client.user).hasPermission('CONNECT')) { + throw new Error('You do not have permission to join this voice channel'); + } + const existingConnection = this.connections.get(channel.guild.id); if (existingConnection) { if (existingConnection.channel.id !== channel.id) { From 35ac80024a71ae4a71144f1b8f8735e5322177d8 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 26 Oct 2016 15:52:40 +0100 Subject: [PATCH 170/188] Rename some events (mainly guild events) --- src/client/actions/GuildMemberRemove.js | 5 ++--- src/client/actions/GuildRoleCreate.js | 7 +++---- src/client/actions/GuildRoleDelete.js | 5 ++--- src/client/actions/GuildRoleUpdate.js | 5 ++--- .../websocket/packets/handlers/GuildMembersChunk.js | 5 ++--- src/client/websocket/packets/handlers/PresenceUpdate.js | 3 +-- src/structures/Guild.js | 8 +++----- src/util/Constants.js | 6 +++--- 8 files changed, 18 insertions(+), 26 deletions(-) diff --git a/src/client/actions/GuildMemberRemove.js b/src/client/actions/GuildMemberRemove.js index 88221174f..d68b8b5f2 100644 --- a/src/client/actions/GuildMemberRemove.js +++ b/src/client/actions/GuildMemberRemove.js @@ -17,7 +17,7 @@ class GuildMemberRemoveAction extends Action { guild.memberCount--; guild._removeMember(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); + if (client.status === Constants.Status.READY) client.emit(Constants.Events.GUILD_MEMBER_REMOVE, member); this.scheduleForDeletion(guild.id, data.user.id); } else { member = this.deleted.get(guild.id + data.user.id) || null; @@ -43,8 +43,7 @@ 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 {GuildMember} member The member that has left/been kicked from the guild. */ module.exports = GuildMemberRemoveAction; diff --git a/src/client/actions/GuildRoleCreate.js b/src/client/actions/GuildRoleCreate.js index 206fb043a..82ea19a3b 100644 --- a/src/client/actions/GuildRoleCreate.js +++ b/src/client/actions/GuildRoleCreate.js @@ -11,7 +11,7 @@ class GuildRoleCreate extends Action { 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, role); return { role, }; @@ -24,9 +24,8 @@ 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. + * Emitted whenever a role is created. + * @event Client#roleCreate * @param {Role} role The role that was created. */ diff --git a/src/client/actions/GuildRoleDelete.js b/src/client/actions/GuildRoleDelete.js index a55c7356a..eeaa1e902 100644 --- a/src/client/actions/GuildRoleDelete.js +++ b/src/client/actions/GuildRoleDelete.js @@ -17,7 +17,7 @@ class GuildRoleDeleteAction extends Action { guild.roles.delete(data.role_id); 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); + client.emit(Constants.Events.GUILD_ROLE_DELETE, role); } else { role = this.deleted.get(guild.id + data.role_id) || null; } @@ -39,8 +39,7 @@ 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. + * @event Client#roleDelete * @param {Role} role The role that was deleted. */ diff --git a/src/client/actions/GuildRoleUpdate.js b/src/client/actions/GuildRoleUpdate.js index 72ad1513a..8270517b6 100644 --- a/src/client/actions/GuildRoleUpdate.js +++ b/src/client/actions/GuildRoleUpdate.js @@ -15,7 +15,7 @@ class GuildRoleUpdateAction extends Action { if (role) { oldRole = cloneObject(role); role.setup(data.role); - client.emit(Constants.Events.GUILD_ROLE_UPDATE, guild, oldRole, role); + client.emit(Constants.Events.GUILD_ROLE_UPDATE, oldRole, role); } return { @@ -33,8 +33,7 @@ class GuildRoleUpdateAction extends Action { /** * Emitted whenever a guild role is updated. - * @event Client#guildRoleUpdate - * @param {Guild} guild The guild that the role was updated in. + * @event Client#roleUpdate * @param {Role} oldRole The role before the update. * @param {Role} newRole The role after the update. */ diff --git a/src/client/websocket/packets/handlers/GuildMembersChunk.js b/src/client/websocket/packets/handlers/GuildMembersChunk.js index 6c6257f24..1a58e1cea 100644 --- a/src/client/websocket/packets/handlers/GuildMembersChunk.js +++ b/src/client/websocket/packets/handlers/GuildMembersChunk.js @@ -15,14 +15,13 @@ class GuildMembersChunkHandler extends AbstractHandler { } guild._checkChunks(); - client.emit(Constants.Events.GUILD_MEMBERS_CHUNK, guild, members); + client.emit(Constants.Events.GUILD_MEMBERS_CHUNK, members); } } /** - * Emitted whenever a chunk of Guild members is received + * Emitted whenever a chunk of Guild members is received (all members come from the same guild) * @event Client#guildMembersChunk - * @param {Guild} guild The guild that the chunks relate to * @param {GuildMember[]} members The members in the chunk */ diff --git a/src/client/websocket/packets/handlers/PresenceUpdate.js b/src/client/websocket/packets/handlers/PresenceUpdate.js index 531855b48..9edacd76a 100644 --- a/src/client/websocket/packets/handlers/PresenceUpdate.js +++ b/src/client/websocket/packets/handlers/PresenceUpdate.js @@ -33,7 +33,7 @@ class PresenceUpdateHandler extends AbstractHandler { deaf: false, mute: false, }, false); - client.emit(Constants.Events.GUILD_MEMBER_AVAILABLE, guild, member); + client.emit(Constants.Events.GUILD_MEMBER_AVAILABLE, member); } if (member) { const oldMember = cloneObject(member); @@ -66,7 +66,6 @@ class PresenceUpdateHandler extends AbstractHandler { /** * 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 */ diff --git a/src/structures/Guild.js b/src/structures/Guild.js index d9c7f6ed9..58b28cb8a 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -726,11 +726,10 @@ class Guild { /** * 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 + * @param {GuildMember} member The member that has joined a guild */ if (this.client.ws.status === Constants.Status.READY && emitEvent && !existing) { - this.client.emit(Constants.Events.GUILD_MEMBER_ADD, this, member); + this.client.emit(Constants.Events.GUILD_MEMBER_ADD, member); } this._checkChunks(); @@ -749,11 +748,10 @@ class Guild { /** * 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); + this.client.emit(Constants.Events.GUILD_MEMBER_UPDATE, oldMember, member); } return { diff --git a/src/util/Constants.js b/src/util/Constants.js index cd163cc37..95d203319 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -170,9 +170,9 @@ exports.Events = { GUILD_MEMBER_AVAILABLE: 'guildMemberAvailable', GUILD_MEMBER_SPEAKING: 'guildMemberSpeaking', GUILD_MEMBERS_CHUNK: 'guildMembersChunk', - GUILD_ROLE_CREATE: 'guildRoleCreate', - GUILD_ROLE_DELETE: 'guildRoleDelete', - GUILD_ROLE_UPDATE: 'guildRoleUpdate', + GUILD_ROLE_CREATE: 'roleCreate', + GUILD_ROLE_DELETE: 'roleDelete', + GUILD_ROLE_UPDATE: 'roleUpdate', GUILD_EMOJI_CREATE: 'guildEmojiCreate', GUILD_EMOJI_DELETE: 'guildEmojiDelete', GUILD_EMOJI_UPDATE: 'guildEmojiUpdate', From 0296a717935483476f26def6a6219ae819c6ae13 Mon Sep 17 00:00:00 2001 From: meew0 Date: Wed, 26 Oct 2016 16:54:53 +0200 Subject: [PATCH 171/188] Improve the docs building process (#834) * Add a script to automatically build and push docs This script will checkout the repo in the `docs` branch, then build the docs locally, copy it to that repo, commit and push. It is designed to be used in conjunction with Travis. * Add unencrypted deploy keys to the gitignore * Make Travis automatically execute the deploy script * Add the encrypted deploy key * Update the .travis.yml with the necessary information --- .gitignore | 6 +++- .travis.yml | 6 ++++ docs/deploy/deploy.sh | 68 +++++++++++++++++++++++++++++++++++++ docs/deploy/deploy_key.enc | Bin 0 -> 3248 bytes 4 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 docs/deploy/deploy.sh create mode 100644 docs/deploy/deploy_key.enc diff --git a/.gitignore b/.gitignore index 9167b884f..5b0cfbfeb 100644 --- a/.gitignore +++ b/.gitignore @@ -35,4 +35,8 @@ build/Release node_modules test/auth.json examples/auth.json -docs/_build \ No newline at end of file +docs/_build + +# Secret keys +docs/deploy/deploy_key +docs/deploy/deploy_key.pub diff --git a/.travis.yml b/.travis.yml index 82e77e0af..519e1f82b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,3 +5,9 @@ cache: directories: - node_modules install: npm install +script: bash ./docs/deploy/deploy.sh +env: + global: + - ENCRYPTION_LABEL: "be0b3b658a36" + - COMMIT_AUTHOR_EMAIL: "amishshah.2k@gmail.com" + diff --git a/docs/deploy/deploy.sh b/docs/deploy/deploy.sh new file mode 100644 index 000000000..fa0cdfa70 --- /dev/null +++ b/docs/deploy/deploy.sh @@ -0,0 +1,68 @@ +#!/bin/bash +# Adapted from https://gist.github.com/domenic/ec8b0fc8ab45f39403dd. + +set -e + +function build { + node docs/generator/generator.js +} + +# Ignore Travis checking PRs +if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then + echo "deploy.sh: Ignoring PR build" + build + exit 0 +fi + +# Ignore travis checking other branches irrelevant to users +if [ "$TRAVIS_BRANCH" != "master" -a "$TRAVIS_BRANCH" != "indev" ]; then + echo "deploy.sh: Ignoring push to another branch than master/indev" + build + exit 0 +fi + +SOURCE=$TRAVIS_BRANCH + +# Make sure tag pushes are handled +if [ -n "$TRAVIS_TAG" ]; then + echo "deploy.sh: This is a tag build, proceeding accordingly" + SOURCE=$TRAVIS_TAG +fi + +REPO=`git config remote.origin.url` +SSH_REPO=${REPO/https:\/\/github.com\//git@github.com:} +SHA=`git rev-parse --verify HEAD` + +TARGET_BRANCH="docs" + +# Checkout the repo in the target branch so we can build docs and push to it +git clone $REPO out -b $TARGET_BRANCH +cd out +cd .. + +# Build the docs +build + +# Move the generated JSON file to the newly-checked-out repo, to be committed +# and pushed +mv docs/docs.json out/$SOURCE.json + +# Commit and push +cd out +git config user.name "Travis CI" +git config user.email "$COMMIT_AUTHOR_EMAIL" + +git add . +git commit -m "Docs build: ${SHA}" + +ENCRYPTED_KEY_VAR="encrypted_${ENCRYPTION_LABEL}_key" +ENCRYPTED_IV_VAR="encrypted_${ENCRYPTION_LABEL}_iv" +ENCRYPTED_KEY=${!ENCRYPTED_KEY_VAR} +ENCRYPTED_IV=${!ENCRYPTED_IV_VAR} +openssl aes-256-cbc -K $ENCRYPTED_KEY -iv $ENCRYPTED_IV -in ../docs/deploy/deploy_key.enc -out deploy_key -d +chmod 600 deploy_key +eval `ssh-agent -s` +ssh-add deploy_key + +# Now that we're all set up, we can push. +git push $SSH_REPO $TARGET_BRANCH diff --git a/docs/deploy/deploy_key.enc b/docs/deploy/deploy_key.enc new file mode 100644 index 0000000000000000000000000000000000000000..dcf2a4296722a4105af0a5dcd9ecc55767627bfb GIT binary patch literal 3248 zcmV;h3{Uf@WZUWhW$HU_`W+$#ZbbWm%ymq*ZwmirK4>us?H76lb=w;Yy~YDL=n$%l zpe-A!4AfHLvV-_0D0}|!eF3@2Oj9BkC7c$3JMjo^d3P#a)DqUOfS+P%n z4nXU1GLmR;1IXXS>RZ%*R5-*QPKEOHronCmeN`SF&4oy)qWh$mLev-U+&vn1%#aQn zG{@+TZxrN_p&isHeD9h9F`sTmig-^6!Z)QAU4GFHm=dFwVi#-{>#niv)(k6N4X8Ez zEpv>OFo?2Na0|D9)pw!aP+vQh88cs|4+6k}bl3dkv)+Nx+Z9{qgO~A`bVa|;@GJ!D z97VD!Vx^G#q%V?NZ#J%knQfz&F-AdEA=h|Z=48Ef-5?Wz%KA6sZZu>7#2_b!)L8W} z^yPefW6CNp>@qUjg$Q zgIu@Hc}qHHpgU!kkybyLQa#3 zCK15`-74a%uP7zosKVNWG;dDJ!;-?f8f^SbC7o@E8;B>X-Hx_mk3^ake=~RcU|jXR z(57)d%&B-trcN1dzY)n@0hhq>aY&ZmjWUC<-}>B>w67n8L|lS<89tVc857JFSZLfC zS%P|*pUBV{mjp?7@bOEWdC4f-|0mP^)*w7VoEDXfx)8KiTCK=hX6g0x#of@vElxb= zy7b3L(Dq_`xj9+H399#rM!uB8Dn?sqYzuQjJ+36ej*KJW_feHHAWx*r6gokU(B8!Be)$c1zLo#+z3_&2Dmu)NOv4 zOMNt;xhLt+-_W`bbWoS_L&re&sYa!nKYda>V8}rB-@uX>iZQnlAZgq3s)ZuJ%Ww%~ z*;CF1B61(Zwxah$(3#>kr&XcL_mj}Nq-3oO5W&iHfQ3UWnWJiG3zLM&6pZX_A@Hvv zybE?tnuM$|8Z7@x7)?{k#*K8HQvpGrVX`xcw73`>h$&`X)0#=)yPBdk1iXD_P75eq z&^=O@6O+dAX^j**hDpftUf35w9_%e#US+qJUGcLgXgB|iws24r(=ROE1JDvN#I2E>Q#e6-q8c7&BH2MS~Pfd1%Mo)jT zzCz?j=@%o&e2R+#jgDcj9A3qo)<`KCX}_B-<3xO34T%mjIu_}c=|4gw(c&EbPLiJV z$3yP{laK)D#00-BQ%8y2g5*E^p-9k-EhWJ?I3Et&iVY>SoE+`M%r-J8JWmouRfqLG zKQu}pQf}CP?*UUpqaS`%JvGC{_KnSh@xUb}hFoU%N|&KqGG~C=w<+9CLdSAUtW0}+ z8a0GBoJsmnP>D$|!7%}%7N||ZJ=JK=%BfjHP3Cg)is=gPgfGn-)+E}wh({9)C%C|E zIMMwMJ^D3Yh(&Ude&h;)N>bT7eAu-nLi|rOm71_PMfXyU-uZ=F5ElgmpDxP!qA1+s z_S)6I9)vFFPjw3Q45ZGXc~BR})BFBMK~Px>q|FJJ$L#V&0>C;1yncfqS}Ly}lf@c> z-9W1bRbxPmYNucG>ofj_th`|Xl>*>1UjLYs*(M)PgQ6UxdH$}mK8}xw>Jmq9Y(PT# zARyC6WsB)LT=C(*zc0(0l`kvH#H!B|3`68(ZvL3nfzhNuv{(eWz~xlM9*EtwHMkXD zJUi@it&eIK`=Bcjuz#fiYd3@vCcG`cH%5knw0{=f`LbjsInBr*R5JjLC}-HT=v!j@ zb6MBe1;W2`6@K_0q|N4^B;q&OOIq5Xb}EM-H(e3PM3O{Ht58N+DD+WcPdEY8Y% z!{n%rzqy@RcA2-rJHd%cC4y0fDefgLtTFvKDzP-rm3)CP9^$e6E06yeaS5*fial7> z^o;RdNJE->74NUR%A6%9e=;7`riPBOCC>HzIFzNp?&-Fd8wriAnc|yltjFCiwXpoM zq5Ul+$xj*pceyqvz*IMBW%w>3vx~=V(NFvR!GN?wo4|Gg**oio=z?Cz96XDXx(M?3=9 zgLcgCDFX^cR07%(Rq*;YvkmB?vBzs_GG^XJa_sW{-76}oxFx?71-n{S78l%Cr#K=T z;S}vy`+z%tufwwyOY;?0#1DsV_aSybK8B{B^4hVmyPkfPORvY0tHM(p&xmb=z^)$P zcn7f;$fDw2h-+w^#UD0Y>;Osv5SreMn7qn7u8v`aP`OQamawFDqj`cjEVf-R9Y-{+ z+g=6os&tUg``B>(^;?I1MZXuijSgVmcioYv^0Q}&GgE;uBEP*m6#dzz^kauwFi1Sa z_4*BrdymhBr%sLczScyA`*k>3nZ05i!1Ab-r}AA25&s1RG5FiDhAP}U_d6k`m=WO) z8n$jJ>tf^qSm}2WG_yj@#zBX$Ho~5bl=cf=U5L7FmEc9=BgFCVlrL)O^UE~8&*LES zN>^9eHX4j6&y$B|9dh!JVJN~qH}n&E;)&23EaU);#=elvpKb^QuI2PBfutM?8C&$2 zsYWf|2WzNN8kjfcRoC zt9It9H}fuee;6VCMzCZO+{=E#f4mUn@&+uB@hXYMAUz}W=20(}TCR+}%Mek%5eO6OMdRO5)+Q5z z6@VzP+_kJJm>k7GACE5sVbvdyI{qXsiyW?v77RR!@j>{F!{Z`isifEJzF29XjGDo| z3sE&S>TDMP>%0Gc=lkCch1&1o9!o&*xMbL6;ZAOebM&Jd5MIO_-G9IL5gV@1^$qVb9sjZeB5i$mwmxSCx8H=%%2ow+B26mjOgG zX1Ydv?|o<@Bbx7nB`M)_>RM2sd<68cihYRg%Sgn8}vO_EKL+l7|WjXDfeW zf2Z_PaeWTPNImCrQ&BpuT&)22ABxwtB;5{avb(g7)pqXj?yfl1rDNy5*}T+NF9hJ! z9$r;{bF1gx4~zpJ@k(cSM&HmB;mpLjB+03EnSiQyZNYcXZ=Uyp4ByciW%~OaPsn^d z5ME#0V5VT-4=*bEj!K8Q_l)f^wlRzZYb;W^e}Lb^*_ZJaZIJqapNSf9x}u?GX@Rw{(b;de6xq=Z5@z-LMUY&7nK{ISUW-*DAj zSsa0?pBhvWWgeigLeHLII65HB+7H^6WHQC7^XwHqcfL9yIPd zN_S*B9#NP1R_^2<7Mv4i=?_VC@~jN zz8}SDcb!uDux1~=e8~H(nn-CN*w>eqrRi=y3dHUn31dl5=+jinaE4#Cpc15SKDz|a i(B+@jT+t=xhGEV2z+wPP+fPnvt}kn Date: Wed, 26 Oct 2016 15:57:45 +0100 Subject: [PATCH 172/188] Reduce doc log size --- docs/generator/types/DocumentedMember.js | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/generator/types/DocumentedMember.js b/docs/generator/types/DocumentedMember.js index 632bf382f..3eaddc24e 100644 --- a/docs/generator/types/DocumentedMember.js +++ b/docs/generator/types/DocumentedMember.js @@ -40,7 +40,6 @@ class DocumentedMember extends DocumentedItem { serialize() { super.serialize(); - console.log('serializing', this); const { id, name, description, memberof, type, access, meta, properties } = this.directData; return { id, From 60a911e4a054ae2d42497206072fbfe7eaab1d17 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Wed, 26 Oct 2016 09:59:15 -0500 Subject: [PATCH 173/188] add clientUser#createGuild (#832) * add clientUser#createGuild merge docs * almost caused a memory leak! * muh triggers --- docs/docs.json | 2 +- src/client/rest/RESTMethods.js | 20 ++++++++++++++++++++ src/structures/ClientUser.js | 21 +++++++++++++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index a8d1cb139..7eeccbda9 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1477421223832},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array or collection of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]],[["Collection",".<"],["string",", "],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":23,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"oldEmoji","description":"The old emoji","type":{"types":[[["Emoji",""]]]}},{"name":"newEmoji","description":"The new emoji","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":286,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":700,"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":723,"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":748,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":83,"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":91,"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":99,"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":106,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":113,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":120,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"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":126,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":198,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":239,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":248,"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":258,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#voiceConnection","name":"voiceConnection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"SecretKey","name":"SecretKey","description":"Represents a Secret Key used in encryption over voice","meta":{"line":4,"file":"SecretKey.js","path":"src/client/voice/util"},"methods":[],"properties":[{"id":"SecretKey#key","name":"key","description":"The key used for encryption","memberof":"SecretKey","type":{"types":[[["Uint8Array",""]]]},"meta":{"line":10,"file":"SecretKey.js","path":"src/client/voice/util"},"props":[]}],"events":[]},{"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":19,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnect the voice connection, causing a disconnected and closing event to be emitted.","memberof":"VoiceConnection","meta":{"line":99,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":194,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.log);"],"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":225,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":234,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#voiceManager","name":"voiceManager","description":"The Voice Manager that instantiated this connection","memberof":"VoiceConnection","type":{"types":[[["ClientVoiceManager",""]]]},"meta":{"line":27,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The voice channel this connection is currently serving","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#receivers","name":"receivers","description":"An array of Voice Receivers that have been created for this connection","memberof":"VoiceConnection","type":{"types":[[["Array",".<"],["VoiceReceiver",">"]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#authentication","name":"authentication","description":"The authentication data needed to connect to the voice server","memberof":"VoiceConnection","type":{"types":[[["object",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#player","name":"player","description":"The audio player for this voice connection","memberof":"VoiceConnection","type":{"types":[[["AudioPlayer",""]]]},"meta":{"line":51,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ssrcMap","name":"ssrcMap","description":"Map SSRC to speaking values","memberof":"VoiceConnection","type":{"types":[[["Map",".<"],["number",", "],["boolean",">"]]]},"meta":{"line":66,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#sockets","name":"sockets","description":"Object that wraps contains the `ws` and `udp` sockets of this voice connection","memberof":"VoiceConnection","type":{"types":[[["object",""]]]},"meta":{"line":72,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":162,"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":"VoiceConnectionUDPClient","name":"VoiceConnectionUDPClient","description":"Represents a UDP Client for a Voice Connection","meta":{"line":24,"file":"VoiceUDPClient.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnectionUDPClient#findEndpointAddress","name":"findEndpointAddress","description":"Tries to resolve the voice server endpoint to an address","memberof":"VoiceConnectionUDPClient","meta":{"line":76,"file":"VoiceUDPClient.js","path":"src/client/voice"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[]},{"id":"VoiceConnectionUDPClient#send","name":"send","description":"Send a packet to the UDP client","memberof":"VoiceConnectionUDPClient","meta":{"line":94,"file":"VoiceUDPClient.js","path":"src/client/voice"},"returns":{"types":[[["Promise",".<"],["Object",">"]]]},"params":[{"name":"packet","description":"the packet to send","type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"VoiceConnectionUDPClient#voiceConnection","name":"voiceConnection","description":"The voice connection that this UDP client serves","memberof":"VoiceConnectionUDPClient","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":31,"file":"VoiceUDPClient.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnectionUDPClient#socket","name":"socket","description":"The UDP socket","memberof":"VoiceConnectionUDPClient","type":{"types":[[["Socket",""]]]},"meta":{"line":36,"file":"VoiceUDPClient.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnectionUDPClient#discordAddress","name":"discordAddress","description":"The address of the discord voice server","memberof":"VoiceConnectionUDPClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"VoiceUDPClient.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnectionUDPClient#localAddress","name":"localAddress","description":"The local IP address","memberof":"VoiceConnectionUDPClient","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"VoiceUDPClient.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnectionUDPClient#localPort","name":"localPort","description":"The local port","memberof":"VoiceConnectionUDPClient","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"VoiceUDPClient.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnectionUDPClient#discordPort","name":"discordPort","description":"The port of the discord voice server","memberof":"VoiceConnectionUDPClient","type":{"types":[[["number",""]]]},"meta":{"line":69,"file":"VoiceUDPClient.js","path":"src/client/voice"},"props":[]}],"events":[]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":200,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nIf you do not select an amount of shards, the manager will automatically decide the best amount.\nThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":161,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":172,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":187,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":8,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":87,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar('./avatar.png')\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":101,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["FileResolvable",""]],[["Base64Resolveable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":118,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":128,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":140,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#addFriend","name":"addFriend","description":"Send a friend request\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":150,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to send the friend request to.","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"ClientUser#removeFriend","name":"removeFriend","description":"Remove a friend\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":161,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to remove from your friends","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":171,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#block","name":"block","description":"Blocks the user","memberof":"ClientUser","inherits":"User#block","inherited":true,"meta":{"line":158,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"ClientUser#unblock","name":"unblock","description":"Unblocks the user","memberof":"ClientUser","inherits":"User#unblock","inherited":true,"meta":{"line":166,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":176,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":194,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":16,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#friends","name":"friends","description":"A Collection of friends for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":31,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#blocked","name":"blocked","description":"A Collection of blocked users for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":38,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.\nOnly OAuth bot accounts can use this method.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":133,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":165,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":204,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"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":232,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["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":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the 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":300,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":319,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":248,"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":257,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.first();\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.\nOnly OAuth bot accounts can use this method.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":133,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":165,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":204,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"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":232,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["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":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the 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":300,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":319,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":248,"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":257,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":331,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":341,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":350,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":358,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":372,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":393,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":414,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":443,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#type","name":"type","description":"The type of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":107,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":118,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":209,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":218,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":227,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":237,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":276,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":285,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":294,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":305,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":134,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":42,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":48,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":54,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":66,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":83,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":138,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.\nOnly OAuth bot accounts can use this method.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":133,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":165,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":204,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"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":232,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["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":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the 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":300,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":319,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":248,"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":257,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#addFriend","name":"addFriend","description":"Sends a friend request to the user","memberof":"User","meta":{"line":142,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#removeFriend","name":"removeFriend","description":"Removes the user from your friends","memberof":"User","meta":{"line":150,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#block","name":"block","description":"Blocks the user","memberof":"User","meta":{"line":158,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#unblock","name":"unblock","description":"Unblocks the user","memberof":"User","meta":{"line":166,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":176,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":194,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":74,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":87,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":97,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":200,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#filterArray","name":"filterArray","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":238,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":253,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":268,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":283,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":295,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":309,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.\nOnly OAuth bot accounts can use this method.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":133,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":165,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":204,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":232,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["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":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The 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":300,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":319,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":248,"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":257,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":173,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":145,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":280,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMatches","description":"Maximum number of successfully filtered messages to obtain","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"WebhookMessageOptions","name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1477492896402},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":253,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array or collection of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]],[["Collection",".<"],["string",", "],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":268,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":278,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":288,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":300,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":23,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"oldEmoji","description":"The old emoji","type":{"types":[[["Emoji",""]]]}},{"name":"newEmoji","description":"The new emoji","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":401,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":407,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":286,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":726,"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":749,"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":774,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":83,"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":91,"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":99,"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":106,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":113,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":120,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"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":126,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":198,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":239,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":248,"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":258,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":65,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":75,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":94,"file":"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":109,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":33,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#voiceConnection","name":"voiceConnection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":39,"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":122,"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":132,"file":"VoiceReceiver.js","path":"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":140,"file":"VoiceReceiver.js","path":"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":"SecretKey","name":"SecretKey","description":"Represents a Secret Key used in encryption over voice","meta":{"line":4,"file":"SecretKey.js","path":"src/client/voice/util"},"methods":[],"properties":[{"id":"SecretKey#key","name":"key","description":"The key used for encryption","memberof":"SecretKey","type":{"types":[[["Uint8Array",""]]]},"meta":{"line":10,"file":"SecretKey.js","path":"src/client/voice/util"},"props":[]}],"events":[]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord. v10 flag.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":19,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnect the voice connection, causing a disconnect and closing event to be emitted.","memberof":"VoiceConnection","meta":{"line":109,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":214,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.log);"],"meta":{"line":234,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":245,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":254,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#voiceManager","name":"voiceManager","description":"The Voice Manager that instantiated this connection","memberof":"VoiceConnection","type":{"types":[[["ClientVoiceManager",""]]]},"meta":{"line":27,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The voice channel this connection is currently serving","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#receivers","name":"receivers","description":"An array of Voice Receivers that have been created for this connection","memberof":"VoiceConnection","type":{"types":[[["Array",".<"],["VoiceReceiver",">"]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#authentication","name":"authentication","description":"The authentication data needed to connect to the voice server","memberof":"VoiceConnection","type":{"types":[[["object",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#player","name":"player","description":"The audio player for this voice connection","memberof":"VoiceConnection","type":{"types":[[["AudioPlayer",""]]]},"meta":{"line":51,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ssrcMap","name":"ssrcMap","description":"Map SSRC to speaking values","memberof":"VoiceConnection","type":{"types":[[["Map",".<"],["number",", "],["boolean",">"]]]},"meta":{"line":76,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#sockets","name":"sockets","description":"Object that wraps contains the `ws` and `udp` sockets of this voice connection","memberof":"VoiceConnection","type":{"types":[[["object",""]]]},"meta":{"line":82,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:debug","name":"debug","description":"Debug info from the connection","memberof":"VoiceConnection","meta":{"line":54,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"message","description":"the debug message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#event:warn","name":"warn","description":"Warning info from the connection","memberof":"VoiceConnection","meta":{"line":63,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"warning","description":"the warning","type":{"types":[[["string",""]],[["error",""]]]}}]},{"id":"VoiceConnection#event:disconnect","name":"disconnect","description":"Emitted when the voice connection disconnects","memberof":"VoiceConnection","meta":{"line":120,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters an error.","memberof":"VoiceConnection","meta":{"line":141,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready, when a promise to join a voice channel resolves,\nthe connection will already be ready.","memberof":"VoiceConnection","meta":{"line":155,"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":182,"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":"VoiceConnectionUDPClient","name":"VoiceConnectionUDPClient","description":"Represents a UDP Client for a Voice Connection","meta":{"line":22,"file":"VoiceUDPClient.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnectionUDPClient#findEndpointAddress","name":"findEndpointAddress","description":"Tries to resolve the voice server endpoint to an address","memberof":"VoiceConnectionUDPClient","meta":{"line":83,"file":"VoiceUDPClient.js","path":"src/client/voice"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[]},{"id":"VoiceConnectionUDPClient#send","name":"send","description":"Send a packet to the UDP client","memberof":"VoiceConnectionUDPClient","meta":{"line":101,"file":"VoiceUDPClient.js","path":"src/client/voice"},"returns":{"types":[[["Promise",".<"],["Object",">"]]]},"params":[{"name":"packet","description":"the packet to send","type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"VoiceConnectionUDPClient#voiceConnection","name":"voiceConnection","description":"The voice connection that this UDP client serves","memberof":"VoiceConnectionUDPClient","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":30,"file":"VoiceUDPClient.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnectionUDPClient#socket","name":"socket","description":"The UDP socket","memberof":"VoiceConnectionUDPClient","type":{"types":[[["Socket",""]]]},"meta":{"line":36,"file":"VoiceUDPClient.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnectionUDPClient#discordAddress","name":"discordAddress","description":"The address of the discord voice server","memberof":"VoiceConnectionUDPClient","type":{"types":[[["string",""]]]},"meta":{"line":42,"file":"VoiceUDPClient.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnectionUDPClient#localAddress","name":"localAddress","description":"The local IP address","memberof":"VoiceConnectionUDPClient","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"VoiceUDPClient.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnectionUDPClient#localPort","name":"localPort","description":"The local port","memberof":"VoiceConnectionUDPClient","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"VoiceUDPClient.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnectionUDPClient#discordPort","name":"discordPort","description":"The port of the discord voice server","memberof":"VoiceConnectionUDPClient","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"VoiceUDPClient.js","path":"src/client/voice"},"props":[]}],"events":[]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":200,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nIf you do not select an amount of shards, the manager will automatically decide the best amount.\nThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":161,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":172,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":187,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":8,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":87,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar('./avatar.png')\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":101,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["FileResolvable",""]],[["Base64Resolveable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":118,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":128,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":140,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#addFriend","name":"addFriend","description":"Send a friend request\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":150,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to send the friend request to.","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"ClientUser#removeFriend","name":"removeFriend","description":"Remove a friend\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":161,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to remove from your friends","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"ClientUser#createGuild","name":"createGuild","description":"Creates a guild\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":174,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The name of the guild","type":{"types":[[["string",""]]]}},{"name":"region","description":"The region for the server","type":{"types":[[["string",""]]]}},{"name":"icon","description":"The icon for the guild","optional":true,"type":{"types":[[["FileResolvable",""]],[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":192,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#block","name":"block","description":"Blocks the user","memberof":"ClientUser","inherits":"User#block","inherited":true,"meta":{"line":158,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"ClientUser#unblock","name":"unblock","description":"Unblocks the user","memberof":"ClientUser","inherits":"User#unblock","inherited":true,"meta":{"line":166,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":176,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":194,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":16,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#friends","name":"friends","description":"A Collection of friends for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":31,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#blocked","name":"blocked","description":"A Collection of blocked users for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":38,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.\nOnly OAuth bot accounts can use this method.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":133,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":165,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":204,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"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":232,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["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":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the 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":300,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":319,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":248,"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":257,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.first();\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.\nOnly OAuth bot accounts can use this method.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":133,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":165,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":204,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"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":232,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["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":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the 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":300,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":319,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":248,"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":257,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#setRolePosition","name":"setRolePosition","description":"Set the position of a role in this guild","memberof":"Guild","meta":{"line":639,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"role","description":"the role to edit, can be a role object or a role ID.","type":{"types":[[["string",""]],[["Role",""]]]}},{"name":"position","description":"the new position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":666,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":703,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":315,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":330,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":340,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":349,"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":357,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":371,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":392,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":413,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":442,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#type","name":"type","description":"The type of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":107,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":118,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":209,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":218,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":227,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":237,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":275,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":284,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":293,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":304,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":134,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":42,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":48,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":54,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":66,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":83,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":138,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.\nOnly OAuth bot accounts can use this method.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":133,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":165,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":204,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"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":232,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["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":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the 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":300,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":319,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":248,"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":257,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#addFriend","name":"addFriend","description":"Sends a friend request to the user","memberof":"User","meta":{"line":142,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#removeFriend","name":"removeFriend","description":"Removes the user from your friends","memberof":"User","meta":{"line":150,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#block","name":"block","description":"Blocks the user","memberof":"User","meta":{"line":158,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#unblock","name":"unblock","description":"Unblocks the user","memberof":"User","meta":{"line":166,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":176,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":194,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":74,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":87,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":97,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":200,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#filterArray","name":"filterArray","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":238,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":253,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":268,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":283,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":295,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":309,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.\nOnly OAuth bot accounts can use this method.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":133,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":165,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":204,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":232,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["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":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The 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":300,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":319,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":248,"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":257,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":193,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":145,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":280,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMatches","description":"Maximum number of successfully filtered messages to obtain","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"WebhookMessageOptions","name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"sync","description":"Whether to periodically sync guilds\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":40,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 380a7b714..7c11c8e00 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -205,6 +205,26 @@ class RESTMethods { }); } + createGuild(options) { + options.icon = this.rest.client.resolver.resolveBase64(options.icon) || null; + options.region = options.region || 'us-central'; + return new Promise((resolve, reject) => { + this.rest.makeRequest('post', Constants.Endpoints.guilds, true, options) + .then(data => { + if (this.rest.client.guilds.has(data.id)) resolve(this.rest.client.guilds.get(data.id)); + const handleGuild = guild => { + if (guild.id === data.id) resolve(guild); + this.rest.client.removeListener('guildCreate', handleGuild); + }; + this.rest.client.on('guildCreate', handleGuild); + this.rest.client.setTimeout(() => { + this.rest.client.removeListener('guildCreate', handleGuild); + reject(new Error('Took too long to receive guild data')); + }, 10000); + }).catch(reject); + }); + } + // untested but probably will work deleteGuild(guild) { return new Promise((resolve, reject) => { diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index 899504411..cd7c3891a 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -163,6 +163,27 @@ class ClientUser extends User { return this.client.rest.methods.removeFriend(user); } + /** + * Creates a guild + * This is only available for user accounts, not bot accounts! + * @param {string} name The name of the guild + * @param {string} region The region for the server + * @param {FileResolvable|Base64Resolvable} [icon=null] The icon for the guild + * @returns {Promise} The guild that was created + */ + createGuild(name, region, icon = null) { + return new Promise(resolve => { + if (!icon) resolve(this.client.rest.methods.createGuild({ name, icon, region })); + if (icon.startsWith('data:')) { + resolve(this.client.rest.methods.createGuild({ name, icon, region })); + } else { + this.client.resolver.resolveFile(icon).then(data => { + resolve(this.client.rest.methods.createGuild({ name, icon: data, region })); + }); + } + }); + } + /** * Set the full presence of the current user. * @param {Object} data the data to provide From e85fd4482ff4b1ae6fcbc70ed1945143d37b1336 Mon Sep 17 00:00:00 2001 From: meew0 Date: Wed, 26 Oct 2016 17:02:01 +0200 Subject: [PATCH 174/188] Fix the secret Travis details Apparently the environment variables weren't correctly stored last time, so they had to be regenerated. --- .travis.yml | 2 +- docs/deploy/deploy_key.enc | Bin 3248 -> 3248 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 519e1f82b..310a7c4b1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,6 @@ install: npm install script: bash ./docs/deploy/deploy.sh env: global: - - ENCRYPTION_LABEL: "be0b3b658a36" + - ENCRYPTION_LABEL: "af862fa96d3e" - COMMIT_AUTHOR_EMAIL: "amishshah.2k@gmail.com" diff --git a/docs/deploy/deploy_key.enc b/docs/deploy/deploy_key.enc index dcf2a4296722a4105af0a5dcd9ecc55767627bfb..e03fc36d76feffef7706f7e3b37297e4053dd3fa 100644 GIT binary patch literal 3248 zcmV;h3{UfQ7qe5cltM)3H)E$<0*dYcb_y)AMS*!fAQBmoURieK{5Ji;@B_GMMkOYb zF}xIvNM3<%jLfQ%!s?X#dB_7qis+rm34dO#srpI5Pc5D+=_qL7%+Qo5{b`624Tk!3@BJYWP!^#wW}gAkJ_V)1hkHNy zjzNG5ERQ5arPF=0x8?`^`auCCoJ6eEQp*vwA6_AW%QlCQ7rQGsWN@373JMgCD{6 zp}XRPZ7-YqJj@g+Z-Mn{#g%Pikv9p|JHO~oTQnkV%;K`zh)IOTqn~ZrZyS0+KGSQz zWC_MqUeYTu*p?PzPD%EAGuUnrWfKfgV~XwnxZU$E-BM&otzBc;~(Am zYaAc|^^twGqRx>+eGCP5E4)59)D;*W@ z&3Pu=lc>Z<7A0Td+X@uko!xe50>5v(>-i`Lkv+*0;B!3jF<6MUXQN$5hxJ(DIwM5k_DiIY`CrOdkbd^@!1n$Thtdgbfm=;J*gyEJ8%#zZi+3 z)Q_X~0WDIwIA0dl1hQXHH2CTLjZvQdi}K`3N5tau{7-2m?u~X(RDqFjT^kz#c0SzC z@+(Xr-}zgA;TH|Ks2YBbzkmeuL?y*j-2|~z_k}VBcil!y#q;b+24)1|2WL*OPk=^Q zo(49b$h3>R#6?ra)GG`Vg3E37*4nzjVX8N=wR!U4KYg=wuh5A8Kn--q?_>GHiD z4D9RD!dRCK5fGX>zd@bV3y=0X$-D6ZX@DbzALQ&LBfr7|+^iEKe^Ud3KOn)h#bF&| zTft%Wfc-NcZ&}j=)IfpxgGM0;6$Se}NI65*RtDF3Gy*a??wrtvx5N-e54u%%)2_DF@`<7%PVo_^i)s z3K!?fdkLX5q^5!e#@?tDzoKdS%ksRZepz1}?@VaSrD8{=;qp~5R4G6{PQU~`EMO@c zjjdB#_hkQK4mo$t#j95*qGhAy5bMEOEl!{+^N1G+`+ zcm(+t%U%YH)UmDgPUsaj7eJhw?#|J@+!`NC>k*X(34r>48V8JYvL>~+x_r-Ar6vW0 zMAfv+qIZ?@ntd_PC&hJ=JDgtFfS~HlHxXexUj1<=hmLT&UYMt*C+k(gA(THdP=yCK zO@hVR3ay8i9%?XPnNW8NmX8pw3I06tEw$%%<$`%o@9g^-rE~d~O-nZ3gsMm)S(G}hvJuVCEc3FE-wcqGw1Rz3S zX|jOU`#e^EYj}e|O3vQ_6GtS!I?TpHROUvI>HB<>(sZIc;HADkftzD4~| zMCq6Tv#`3577YYC@z%gQ1(b*E*;SL~TD=}*Te8lyNu3$}ND%mM);e1gZCR$&A6^aN zRjKLOgt=9Gx=6vzqm&xG9#)lV@YV*HYZGLtxUkDvo6gWu&b4=^pT}$n8Jc7lw^>Lz zH^tZAF{2=zKG-3v6`hGgC(o$e3F!*`e$>z0zMr4gqvns2`FQE4R%a_G|7SZ)O`rv! zwq2W>EZbo^atWCOh;T~B(c+$>tvvc?LtxzVgQk4oMf(7bVLsX+EY=_rlH@bTL zwr)tDG_ClyK-YxS^j)V@>In)w(Ibc|Ap1BfF&*nZDlhpfN`h8Nz~3TA z#J0X#!uTEA3ak_cNFWd;fQvimIiz_Fn45ObH~_Fx)sUPHN?IJjRX-r{HY{M})l4+O z6$Hf^awj!~6^#LV0Ha|CvxU?Ks$tsz1TS9xHf2NM8|x{KKy+AlplB&ec<4!1aGoJy zu^7K@Y;57i6}vzu!jw_lOs`Ec6|7Cdti^m@b^^O}Z!V=wKW()W-_cdzs5gS5Lqij* zUafTBaBDj55HZkoDv}bbWIcI&BdaZ5T`})rS%^30+Tij@2ivsIRm(fIkxmO71$L9! zCXL+`Dc!G+4UqXy^X4kFF(w-of~J*n_iyud@cV|h z!+W6qe_=BJJRy)WXB{7mDBV4RrO%*Z7OLZ+M!}g8x>vqxZ@~=M=$?0Kiaal2L2NUk zOrl9Vl#am2=_Bkz*>+Y90{ccFWEy&9_Enr9ai735V;z1^o3rj?5{{0az-Hd>ss+{N z2I5~47xG-`&7ln2gn|ePl$At`$RhT@kXihGqH0W;RA$>UeNw-=jti4zBdVLZ*G*V?Tq!tbg2}v5L;Ft){qdv;J=1{9R$Z{W3rf$mpJ$Q z%lKVC`sfn>ePjpYV<|Q}axIy0*XoUsCdt8y!t^^f!>DzF5jaoIR zg`dMqg%gSJCB<8blzbsrnS)I-3V~B@hJ_^>h0ucfUX~yFI2V7TL6abO5iW42pI#mv z)r4_>mH9&Q|(#!7WQ_e{;rfw5rak{U=?PE7OeW(HMOG=%Ge)iwTi zZ(v;tzRe3Eo!-ee)YdsC|L0gwDbhVVu5LB3&A*iD5-P)>uhl#fhLhUW8m7Ii^Mniq zQ(NZ_yIm}9QCR&fUfiw<1ap|cgYle8aDM+esvnKAp92B_z8zEkspsNNzIc@&8&vuX zya|*P8DuGz3NN!ppWfRSYaouy%AN=GjbV3@e>!T56sxu|PiXx?0t0-Qk4jPRb>1qav@ z7qckX#}@0JyM0t~-if&7fcwS87-G(!ee3+4hPZt+iqGF=yAf>%XV#DJvdon?h6=4q z_#+~vqW?r+q4l}N+Rf?8^2P7)_^~OX>_0VBus?H76lb=w;Yy~YDL=n$%l zpe-A!4AfHLvV-_0D0}|!eF3@2Oj9BkC7c$3JMjo^d3P#a)DqUOfS+P%n z4nXU1GLmR;1IXXS>RZ%*R5-*QPKEOHronCmeN`SF&4oy)qWh$mLev-U+&vn1%#aQn zG{@+TZxrN_p&isHeD9h9F`sTmig-^6!Z)QAU4GFHm=dFwVi#-{>#niv)(k6N4X8Ez zEpv>OFo?2Na0|D9)pw!aP+vQh88cs|4+6k}bl3dkv)+Nx+Z9{qgO~A`bVa|;@GJ!D z97VD!Vx^G#q%V?NZ#J%knQfz&F-AdEA=h|Z=48Ef-5?Wz%KA6sZZu>7#2_b!)L8W} z^yPefW6CNp>@qUjg$Q zgIu@Hc}qHHpgU!kkybyLQa#3 zCK15`-74a%uP7zosKVNWG;dDJ!;-?f8f^SbC7o@E8;B>X-Hx_mk3^ake=~RcU|jXR z(57)d%&B-trcN1dzY)n@0hhq>aY&ZmjWUC<-}>B>w67n8L|lS<89tVc857JFSZLfC zS%P|*pUBV{mjp?7@bOEWdC4f-|0mP^)*w7VoEDXfx)8KiTCK=hX6g0x#of@vElxb= zy7b3L(Dq_`xj9+H399#rM!uB8Dn?sqYzuQjJ+36ej*KJW_feHHAWx*r6gokU(B8!Be)$c1zLo#+z3_&2Dmu)NOv4 zOMNt;xhLt+-_W`bbWoS_L&re&sYa!nKYda>V8}rB-@uX>iZQnlAZgq3s)ZuJ%Ww%~ z*;CF1B61(Zwxah$(3#>kr&XcL_mj}Nq-3oO5W&iHfQ3UWnWJiG3zLM&6pZX_A@Hvv zybE?tnuM$|8Z7@x7)?{k#*K8HQvpGrVX`xcw73`>h$&`X)0#=)yPBdk1iXD_P75eq z&^=O@6O+dAX^j**hDpftUf35w9_%e#US+qJUGcLgXgB|iws24r(=ROE1JDvN#I2E>Q#e6-q8c7&BH2MS~Pfd1%Mo)jT zzCz?j=@%o&e2R+#jgDcj9A3qo)<`KCX}_B-<3xO34T%mjIu_}c=|4gw(c&EbPLiJV z$3yP{laK)D#00-BQ%8y2g5*E^p-9k-EhWJ?I3Et&iVY>SoE+`M%r-J8JWmouRfqLG zKQu}pQf}CP?*UUpqaS`%JvGC{_KnSh@xUb}hFoU%N|&KqGG~C=w<+9CLdSAUtW0}+ z8a0GBoJsmnP>D$|!7%}%7N||ZJ=JK=%BfjHP3Cg)is=gPgfGn-)+E}wh({9)C%C|E zIMMwMJ^D3Yh(&Ude&h;)N>bT7eAu-nLi|rOm71_PMfXyU-uZ=F5ElgmpDxP!qA1+s z_S)6I9)vFFPjw3Q45ZGXc~BR})BFBMK~Px>q|FJJ$L#V&0>C;1yncfqS}Ly}lf@c> z-9W1bRbxPmYNucG>ofj_th`|Xl>*>1UjLYs*(M)PgQ6UxdH$}mK8}xw>Jmq9Y(PT# zARyC6WsB)LT=C(*zc0(0l`kvH#H!B|3`68(ZvL3nfzhNuv{(eWz~xlM9*EtwHMkXD zJUi@it&eIK`=Bcjuz#fiYd3@vCcG`cH%5knw0{=f`LbjsInBr*R5JjLC}-HT=v!j@ zb6MBe1;W2`6@K_0q|N4^B;q&OOIq5Xb}EM-H(e3PM3O{Ht58N+DD+WcPdEY8Y% z!{n%rzqy@RcA2-rJHd%cC4y0fDefgLtTFvKDzP-rm3)CP9^$e6E06yeaS5*fial7> z^o;RdNJE->74NUR%A6%9e=;7`riPBOCC>HzIFzNp?&-Fd8wriAnc|yltjFCiwXpoM zq5Ul+$xj*pceyqvz*IMBW%w>3vx~=V(NFvR!GN?wo4|Gg**oio=z?Cz96XDXx(M?3=9 zgLcgCDFX^cR07%(Rq*;YvkmB?vBzs_GG^XJa_sW{-76}oxFx?71-n{S78l%Cr#K=T z;S}vy`+z%tufwwyOY;?0#1DsV_aSybK8B{B^4hVmyPkfPORvY0tHM(p&xmb=z^)$P zcn7f;$fDw2h-+w^#UD0Y>;Osv5SreMn7qn7u8v`aP`OQamawFDqj`cjEVf-R9Y-{+ z+g=6os&tUg``B>(^;?I1MZXuijSgVmcioYv^0Q}&GgE;uBEP*m6#dzz^kauwFi1Sa z_4*BrdymhBr%sLczScyA`*k>3nZ05i!1Ab-r}AA25&s1RG5FiDhAP}U_d6k`m=WO) z8n$jJ>tf^qSm}2WG_yj@#zBX$Ho~5bl=cf=U5L7FmEc9=BgFCVlrL)O^UE~8&*LES zN>^9eHX4j6&y$B|9dh!JVJN~qH}n&E;)&23EaU);#=elvpKb^QuI2PBfutM?8C&$2 zsYWf|2WzNN8kjfcRoC zt9It9H}fuee;6VCMzCZO+{=E#f4mUn@&+uB@hXYMAUz}W=20(}TCR+}%Mek%5eO6OMdRO5)+Q5z z6@VzP+_kJJm>k7GACE5sVbvdyI{qXsiyW?v77RR!@j>{F!{Z`isifEJzF29XjGDo| z3sE&S>TDMP>%0Gc=lkCch1&1o9!o&*xMbL6;ZAOebM&Jd5MIO_-G9IL5gV@1^$qVb9sjZeB5i$mwmxSCx8H=%%2ow+B26mjOgG zX1Ydv?|o<@Bbx7nB`M)_>RM2sd<68cihYRg%Sgn8}vO_EKL+l7|WjXDfeW zf2Z_PaeWTPNImCrQ&BpuT&)22ABxwtB;5{avb(g7)pqXj?yfl1rDNy5*}T+NF9hJ! z9$r;{bF1gx4~zpJ@k(cSM&HmB;mpLjB+03EnSiQyZNYcXZ=Uyp4ByciW%~OaPsn^d z5ME#0V5VT-4=*bEj!K8Q_l)f^wlRzZYb;W^e}Lb^*_ZJaZIJqapNSf9x}u?GX@Rw{(b;de6xq=Z5@z-LMUY&7nK{ISUW-*DAj zSsa0?pBhvWWgeigLeHLII65HB+7H^6WHQC7^XwHqcfL9yIPd zN_S*B9#NP1R_^2<7Mv4i=?_VC@~jN zz8}SDcb!uDux1~=e8~H(nn-CN*w>eqrRi=y3dHUn31dl5=+jinaE4#Cpc15SKDz|a i(B+@jT+t=xhGEV2z+wPP+fPnvt}kn Date: Wed, 26 Oct 2016 16:06:56 +0100 Subject: [PATCH 175/188] hide some voice stuff in docs --- src/client/voice/VoiceConnection.js | 3 +++ src/client/voice/VoiceUDPClient.js | 1 + 2 files changed, 4 insertions(+) diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index c6188ffc7..a03466267 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -41,6 +41,7 @@ class VoiceConnection extends EventEmitter { /** * The authentication data needed to connect to the voice server * @type {object} + * @private */ this.authentication = pendingConnection.data; @@ -72,12 +73,14 @@ class VoiceConnection extends EventEmitter { /** * Map SSRC to speaking values * @type {Map} + * @private */ this.ssrcMap = new Map(); /** * Object that wraps contains the `ws` and `udp` sockets of this voice connection * @type {object} + * @private */ this.sockets = {}; this.connect(); diff --git a/src/client/voice/VoiceUDPClient.js b/src/client/voice/VoiceUDPClient.js index d0e7e7bec..8246478c3 100644 --- a/src/client/voice/VoiceUDPClient.js +++ b/src/client/voice/VoiceUDPClient.js @@ -18,6 +18,7 @@ function parseLocalPacket(message) { /** * Represents a UDP Client for a Voice Connection * @extends {EventEmitter} + * @private */ class VoiceConnectionUDPClient extends EventEmitter { constructor(voiceConnection) { From 597c3ebcbe694430d3526e1d04d915faea663eb1 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 26 Oct 2016 16:09:17 +0100 Subject: [PATCH 176/188] Remove unnecessary docs.json file --- docs/docs.json | 1 - 1 file changed, 1 deletion(-) delete mode 100644 docs/docs.json diff --git a/docs/docs.json b/docs/docs.json deleted file mode 100644 index 7eeccbda9..000000000 --- a/docs/docs.json +++ /dev/null @@ -1 +0,0 @@ -{"meta":{"version":13,"date":1477492896402},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":253,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array or collection of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]],[["Collection",".<"],["string",", "],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":268,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":278,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":288,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":300,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":23,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"oldEmoji","description":"The old emoji","type":{"types":[[["Emoji",""]]]}},{"name":"newEmoji","description":"The new emoji","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":401,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":407,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":286,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":726,"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":749,"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":774,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":83,"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":91,"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":99,"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":106,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":113,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":120,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":75,"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":126,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":198,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":239,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":248,"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":258,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":65,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":75,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":94,"file":"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":109,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":33,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#voiceConnection","name":"voiceConnection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":39,"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":122,"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":132,"file":"VoiceReceiver.js","path":"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":140,"file":"VoiceReceiver.js","path":"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":"SecretKey","name":"SecretKey","description":"Represents a Secret Key used in encryption over voice","meta":{"line":4,"file":"SecretKey.js","path":"src/client/voice/util"},"methods":[],"properties":[{"id":"SecretKey#key","name":"key","description":"The key used for encryption","memberof":"SecretKey","type":{"types":[[["Uint8Array",""]]]},"meta":{"line":10,"file":"SecretKey.js","path":"src/client/voice/util"},"props":[]}],"events":[]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord. v10 flag.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":19,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnect the voice connection, causing a disconnect and closing event to be emitted.","memberof":"VoiceConnection","meta":{"line":109,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":214,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.log);"],"meta":{"line":234,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":245,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":254,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#voiceManager","name":"voiceManager","description":"The Voice Manager that instantiated this connection","memberof":"VoiceConnection","type":{"types":[[["ClientVoiceManager",""]]]},"meta":{"line":27,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The voice channel this connection is currently serving","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#receivers","name":"receivers","description":"An array of Voice Receivers that have been created for this connection","memberof":"VoiceConnection","type":{"types":[[["Array",".<"],["VoiceReceiver",">"]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#authentication","name":"authentication","description":"The authentication data needed to connect to the voice server","memberof":"VoiceConnection","type":{"types":[[["object",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#player","name":"player","description":"The audio player for this voice connection","memberof":"VoiceConnection","type":{"types":[[["AudioPlayer",""]]]},"meta":{"line":51,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ssrcMap","name":"ssrcMap","description":"Map SSRC to speaking values","memberof":"VoiceConnection","type":{"types":[[["Map",".<"],["number",", "],["boolean",">"]]]},"meta":{"line":76,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#sockets","name":"sockets","description":"Object that wraps contains the `ws` and `udp` sockets of this voice connection","memberof":"VoiceConnection","type":{"types":[[["object",""]]]},"meta":{"line":82,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:debug","name":"debug","description":"Debug info from the connection","memberof":"VoiceConnection","meta":{"line":54,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"message","description":"the debug message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#event:warn","name":"warn","description":"Warning info from the connection","memberof":"VoiceConnection","meta":{"line":63,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"warning","description":"the warning","type":{"types":[[["string",""]],[["error",""]]]}}]},{"id":"VoiceConnection#event:disconnect","name":"disconnect","description":"Emitted when the voice connection disconnects","memberof":"VoiceConnection","meta":{"line":120,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters an error.","memberof":"VoiceConnection","meta":{"line":141,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready, when a promise to join a voice channel resolves,\nthe connection will already be ready.","memberof":"VoiceConnection","meta":{"line":155,"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":182,"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":"VoiceConnectionUDPClient","name":"VoiceConnectionUDPClient","description":"Represents a UDP Client for a Voice Connection","meta":{"line":22,"file":"VoiceUDPClient.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnectionUDPClient#findEndpointAddress","name":"findEndpointAddress","description":"Tries to resolve the voice server endpoint to an address","memberof":"VoiceConnectionUDPClient","meta":{"line":83,"file":"VoiceUDPClient.js","path":"src/client/voice"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[]},{"id":"VoiceConnectionUDPClient#send","name":"send","description":"Send a packet to the UDP client","memberof":"VoiceConnectionUDPClient","meta":{"line":101,"file":"VoiceUDPClient.js","path":"src/client/voice"},"returns":{"types":[[["Promise",".<"],["Object",">"]]]},"params":[{"name":"packet","description":"the packet to send","type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"VoiceConnectionUDPClient#voiceConnection","name":"voiceConnection","description":"The voice connection that this UDP client serves","memberof":"VoiceConnectionUDPClient","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":30,"file":"VoiceUDPClient.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnectionUDPClient#socket","name":"socket","description":"The UDP socket","memberof":"VoiceConnectionUDPClient","type":{"types":[[["Socket",""]]]},"meta":{"line":36,"file":"VoiceUDPClient.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnectionUDPClient#discordAddress","name":"discordAddress","description":"The address of the discord voice server","memberof":"VoiceConnectionUDPClient","type":{"types":[[["string",""]]]},"meta":{"line":42,"file":"VoiceUDPClient.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnectionUDPClient#localAddress","name":"localAddress","description":"The local IP address","memberof":"VoiceConnectionUDPClient","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"VoiceUDPClient.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnectionUDPClient#localPort","name":"localPort","description":"The local port","memberof":"VoiceConnectionUDPClient","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"VoiceUDPClient.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnectionUDPClient#discordPort","name":"discordPort","description":"The port of the discord voice server","memberof":"VoiceConnectionUDPClient","type":{"types":[[["number",""]]]},"meta":{"line":75,"file":"VoiceUDPClient.js","path":"src/client/voice"},"props":[]}],"events":[]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":200,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nIf you do not select an amount of shards, the manager will automatically decide the best amount.\nThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":161,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":172,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":187,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":8,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":87,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar('./avatar.png')\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":101,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["FileResolvable",""]],[["Base64Resolveable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":118,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":128,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":140,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#addFriend","name":"addFriend","description":"Send a friend request\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":150,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to send the friend request to.","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"ClientUser#removeFriend","name":"removeFriend","description":"Remove a friend\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":161,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to remove from your friends","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"ClientUser#createGuild","name":"createGuild","description":"Creates a guild\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":174,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The name of the guild","type":{"types":[[["string",""]]]}},{"name":"region","description":"The region for the server","type":{"types":[[["string",""]]]}},{"name":"icon","description":"The icon for the guild","optional":true,"type":{"types":[[["FileResolvable",""]],[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":192,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#block","name":"block","description":"Blocks the user","memberof":"ClientUser","inherits":"User#block","inherited":true,"meta":{"line":158,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"ClientUser#unblock","name":"unblock","description":"Unblocks the user","memberof":"ClientUser","inherits":"User#unblock","inherited":true,"meta":{"line":166,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":176,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":194,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":16,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#friends","name":"friends","description":"A Collection of friends for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":31,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#blocked","name":"blocked","description":"A Collection of blocked users for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":38,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.\nOnly OAuth bot accounts can use this method.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":133,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":165,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":204,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"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":232,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["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":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the 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":300,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":319,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":248,"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":257,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.first();\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.\nOnly OAuth bot accounts can use this method.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":133,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":165,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":204,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"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":232,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["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":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the 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":300,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":319,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":248,"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":257,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#setRolePosition","name":"setRolePosition","description":"Set the position of a role in this guild","memberof":"Guild","meta":{"line":639,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"role","description":"the role to edit, can be a role object or a role ID.","type":{"types":[[["string",""]],[["Role",""]]]}},{"name":"position","description":"the new position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":666,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":703,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":315,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":330,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":340,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":349,"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":357,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":371,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":392,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":413,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":442,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#type","name":"type","description":"The type of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":107,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":118,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":209,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":218,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":227,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":237,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":275,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":284,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":293,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":304,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":134,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":42,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":48,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":54,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":66,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":83,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":138,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.\nOnly OAuth bot accounts can use this method.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":133,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":165,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":204,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"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":232,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["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":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the 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":300,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":319,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":248,"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":257,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#addFriend","name":"addFriend","description":"Sends a friend request to the user","memberof":"User","meta":{"line":142,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#removeFriend","name":"removeFriend","description":"Removes the user from your friends","memberof":"User","meta":{"line":150,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#block","name":"block","description":"Blocks the user","memberof":"User","meta":{"line":158,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#unblock","name":"unblock","description":"Unblocks the user","memberof":"User","meta":{"line":166,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":176,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":194,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":74,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":87,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":97,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":200,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#filterArray","name":"filterArray","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":238,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":253,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":268,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":283,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":295,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":309,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.\nOnly OAuth bot accounts can use this method.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":133,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":165,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":204,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":232,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["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":276,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The 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":300,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete given messages.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":319,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]],[["number",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":248,"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":257,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":193,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":145,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":280,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMatches","description":"Maximum number of successfully filtered messages to obtain","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"WebhookMessageOptions","name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"sync","description":"Whether to periodically sync guilds\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":40,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file From e12c7bf2d4790601f98b32d8000e6df4218624a2 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 26 Oct 2016 16:10:02 +0100 Subject: [PATCH 177/188] Whoops remove something --- src/client/voice/VoiceConnection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index a03466267..7490be89e 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -7,7 +7,7 @@ const EventEmitter = require('events').EventEmitter; const fs = require('fs'); /** - * Represents a connection to a Voice Channel in Discord. v10 flag. + * Represents a connection to a Voice Channel in Discord. * ```js * // obtained using: * voiceChannel.join().then(connection => { From d231adc4894cc7e01289aee103e6bcd004239f91 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 26 Oct 2016 16:14:37 +0100 Subject: [PATCH 178/188] add notice to docs folder --- docs/README.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 docs/README.md diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 000000000..f456e41cb --- /dev/null +++ b/docs/README.md @@ -0,0 +1,2 @@ +# discord.js docs +[View documentation here](http://hydrabolt.github.io/discord.js/#!/docs/) \ No newline at end of file From c6bcf69dc35849f0c85b11e7136895c6318c39a2 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Wed, 26 Oct 2016 10:23:39 -0500 Subject: [PATCH 179/188] added User#fetchProfile (#835) * add User#fetchProfile * fix merge conflicts? --- src/client/rest/RESTMethods.js | 10 +++++++ src/structures/User.js | 8 ++++++ src/structures/UserConnection.js | 48 +++++++++++++++++++++++++++++++ src/structures/UserProfile.js | 49 ++++++++++++++++++++++++++++++++ src/util/Constants.js | 1 + 5 files changed, 116 insertions(+) create mode 100644 src/structures/UserConnection.js create mode 100644 src/structures/UserProfile.js diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 7c11c8e00..1555d4e95 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -8,6 +8,7 @@ const GuildMember = requireStructure('GuildMember'); const Role = requireStructure('Role'); const Invite = requireStructure('Invite'); const Webhook = requireStructure('Webhook'); +const UserProfile = requireStructure('UserProfile'); class RESTMethods { constructor(restManager) { @@ -680,6 +681,15 @@ class RESTMethods { }); } + fetchUserProfile(user) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('get', Constants.Endpoints.userProfile(user.id), true) + .then(data => { + resolve(new UserProfile(user, data)); + }).catch(reject); + }); + } + blockUser(user) { return new Promise((resolve, reject) => { this.rest.makeRequest('put', `${Constants.Endpoints.relationships('@me')}/${user.id}`, true, { type: 2 }) diff --git a/src/structures/User.js b/src/structures/User.js index 5eaea7aba..b9ac5b522 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -167,6 +167,14 @@ class User { return this.client.rest.methods.unblockUser(this); } + /** + * Get the profile of the user + * @returns {Promise} + */ + fetchProfile() { + return this.client.rest.methods.fetchUserProfile(this); + } + /** * Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played. * It is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties. diff --git a/src/structures/UserConnection.js b/src/structures/UserConnection.js new file mode 100644 index 000000000..d25df0300 --- /dev/null +++ b/src/structures/UserConnection.js @@ -0,0 +1,48 @@ +/** + * Represents a User Connection object (or "platform identity") + */ +class UserConnection { + constructor(user, data) { + /** + * The user that owns the Connection + * @type {User} + */ + this.user = user; + + this.setup(data); + } + + setup(data) { + /** + * The type of the Connection + * @type {string} + */ + this.type = data.type; + + /** + * The username of the connection account + * @type {string} + */ + this.name = data.name; + + /** + * The id of the connection account + * @type {string} + */ + this.id = data.id; + + /** + * Whether the connection is revoked + * @type {Boolean} + */ + this.revoked = data.revoked; + + /** + * an array of partial server integrations (not yet implemented in this lib) + * @type {Object[]} + */ + this.integrations = data.integrations; + } +} + +module.exports = UserConnection; diff --git a/src/structures/UserProfile.js b/src/structures/UserProfile.js new file mode 100644 index 000000000..4150b3a72 --- /dev/null +++ b/src/structures/UserProfile.js @@ -0,0 +1,49 @@ +const Collection = require('../util/Collection'); +const UserConnection = require('./UserConnection'); + +/** + * Represents a user's profile on Discord. + */ +class UserProfile { + constructor(user, data) { + /** + * The owner of the profile + * @type {User} + */ + this.user = user; + + /** + * The Client that created the instance of the the User. + * @type {Client} + */ + this.client = this.user.client; + Object.defineProperty(this, 'client', { enumerable: false, configurable: false }); + + /** + * Guilds that the ClientUser and the User share + * @type {Collection} + */ + this.mutualGuilds = new Collection(); + + /** + * The user's connections + * @type {Collection} + */ + this.connections = new Collection(); + + this.setup(data); + } + + setup(data) { + for (const guild of data.mutual_guilds) { + if (this.client.guilds.has(guild.id)) { + this.mutualGuilds.set(guild.id, this.client.guilds.get(guild.id)); + } + } + for (const connection of data.connected_accounts) { + this.connections.set(connection.id, new UserConnection(this.user, connection)); + } + } +} + +module.exports = UserProfile; diff --git a/src/util/Constants.js b/src/util/Constants.js index 95d203319..60575cd61 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -82,6 +82,7 @@ const Endpoints = exports.Endpoints = { // users user: (userID) => `${API}/users/${userID}`, userChannels: (userID) => `${Endpoints.user(userID)}/channels`, + userProfile: (userID) => `${Endpoints.user(userID)}/profile`, avatar: (userID, avatar) => userID === '1' ? avatar : `${Endpoints.user(userID)}/avatars/${avatar}.jpg`, me: `${API}/users/@me`, meGuild: (guildID) => `${Endpoints.me}/guilds/${guildID}`, From 4a5cef0ccfe95f723316efe94665027c403e565d Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 26 Oct 2016 17:29:23 +0100 Subject: [PATCH 180/188] Rename getRecommendedShards to fetchRecommendedShards --- src/index.js | 2 +- src/sharding/ShardingManager.js | 4 ++-- src/util/GetRecommendedShards.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/index.js b/src/index.js index cd2d86ba4..2b8a19e6f 100644 --- a/src/index.js +++ b/src/index.js @@ -8,7 +8,7 @@ module.exports = { Collection: require('./util/Collection'), splitMessage: require('./util/SplitMessage'), escapeMarkdown: require('./util/EscapeMarkdown'), - getRecommendedShards: require('./util/GetRecommendedShards'), + fetchRecommendedShards: require('./util/FetchRecommendedShards'), Channel: require('./structures/Channel'), ClientUser: require('./structures/ClientUser'), diff --git a/src/sharding/ShardingManager.js b/src/sharding/ShardingManager.js index d88678954..74773c897 100644 --- a/src/sharding/ShardingManager.js +++ b/src/sharding/ShardingManager.js @@ -4,7 +4,7 @@ const EventEmitter = require('events').EventEmitter; const mergeDefault = require('../util/MergeDefault'); const Shard = require('./Shard'); const Collection = require('../util/Collection'); -const getRecommendedShards = require('../util/GetRecommendedShards'); +const fetchRecommendedShards = require('../util/fetchRecommendedShards'); /** * This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate @@ -107,7 +107,7 @@ class ShardingManager extends EventEmitter { spawn(amount = this.totalShards, delay = 5500) { return new Promise((resolve, reject) => { if (amount === 'auto') { - getRecommendedShards(this.token).then(count => { + fetchRecommendedShards(this.token).then(count => { this.totalShards = count; resolve(this._spawn(count, delay)); }).catch(reject); diff --git a/src/util/GetRecommendedShards.js b/src/util/GetRecommendedShards.js index 8165cd02f..a60f51006 100644 --- a/src/util/GetRecommendedShards.js +++ b/src/util/GetRecommendedShards.js @@ -6,7 +6,7 @@ const botGateway = require('./Constants').Endpoints.botGateway; * @param {number} token Discord auth token * @returns {Promise} the recommended number of shards */ -module.exports = function getRecommendedShards(token) { +module.exports = function fetchRecommendedShards(token) { return new Promise((resolve, reject) => { if (!token) throw new Error('A token must be provided.'); superagent.get(botGateway) From 7d04863b66177c105a92b39ffc990be3b6bfe84f Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 26 Oct 2016 17:30:18 +0100 Subject: [PATCH 181/188] Revert "fix Client.destroy bugs" (#839) --- src/client/Client.js | 19 +++++++++++-------- src/client/ClientManager.js | 13 ++++++++----- src/client/rest/RESTMethods.js | 2 +- test/destroy.js | 12 ------------ 4 files changed, 20 insertions(+), 26 deletions(-) delete mode 100644 test/destroy.js diff --git a/src/client/Client.js b/src/client/Client.js index f81c72954..58e7f595f 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -234,14 +234,17 @@ class Client extends EventEmitter { * @returns {Promise} */ destroy() { - return this.manager.destroy().then(() => { - for (const t of this._timeouts) clearTimeout(t); - for (const i of this._intervals) clearInterval(i); - this._timeouts.clear(); - this._intervals.clear(); - this.token = null; - this.email = null; - this.password = null; + return new Promise((resolve, reject) => { + this.manager.destroy().then(() => { + for (const t of this._timeouts) clearTimeout(t); + for (const i of this._intervals) clearInterval(i); + this._timeouts = []; + this._intervals = []; + this.token = null; + this.email = null; + this.password = null; + resolve(); + }).catch(reject); }); } diff --git a/src/client/ClientManager.js b/src/client/ClientManager.js index 5e2a42b04..89acc523a 100644 --- a/src/client/ClientManager.js +++ b/src/client/ClientManager.js @@ -58,11 +58,14 @@ class ClientManager { } destroy() { - let p = Promise.resolve(); - if (!this.client.user.bot) { - p = this.client.rest.methods.logout(); - } - return p.then(() => this.client.ws.destroy()); + return new Promise((resolve) => { + if (!this.client.user.bot) { + this.client.rest.methods.logout().then(resolve); + } else { + this.client.ws.destroy(); + resolve(); + } + }); } } diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 1555d4e95..884076fb1 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -36,7 +36,7 @@ class RESTMethods { } logout() { - return this.rest.makeRequest('post', Constants.Endpoints.logout, true, {}); + return this.rest.makeRequest('post', Constants.Endpoints.logout, true); } getGateway() { diff --git a/test/destroy.js b/test/destroy.js deleted file mode 100644 index 08f934de0..000000000 --- a/test/destroy.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -const Discord = require('../'); - -const client = new Discord.Client({ fetch_all_members: false, api_request_method: 'sequential' }); - -const { email, password, token } = require('./auth.json'); - -let p = client.login(token); -p = p.then(() => client.destroy()); -p = p.then(() => client.login(token)); -p = p.then(() => client.destroy()); From 996c9b45e2a8ab201b309771ddf8c75e0613531c Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 26 Oct 2016 19:18:16 +0100 Subject: [PATCH 182/188] Update README for new logo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 11c637acf..f4d11cd7a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

- discord.js
+ discord.js

From ad90705c93bd979a538c89a24df13b428b6dc239 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 26 Oct 2016 19:21:45 +0100 Subject: [PATCH 183/188] fix bug --- src/util/{GetRecommendedShards.js => FetchRecommendedShards.js} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/util/{GetRecommendedShards.js => FetchRecommendedShards.js} (100%) diff --git a/src/util/GetRecommendedShards.js b/src/util/FetchRecommendedShards.js similarity index 100% rename from src/util/GetRecommendedShards.js rename to src/util/FetchRecommendedShards.js From a2f125e41650d79525b65e21583df0a26cd564e4 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 26 Oct 2016 19:27:52 +0100 Subject: [PATCH 184/188] case sensitive --- src/sharding/ShardingManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sharding/ShardingManager.js b/src/sharding/ShardingManager.js index 74773c897..66814babb 100644 --- a/src/sharding/ShardingManager.js +++ b/src/sharding/ShardingManager.js @@ -4,7 +4,7 @@ const EventEmitter = require('events').EventEmitter; const mergeDefault = require('../util/MergeDefault'); const Shard = require('./Shard'); const Collection = require('../util/Collection'); -const fetchRecommendedShards = require('../util/fetchRecommendedShards'); +const fetchRecommendedShards = require('../util/FetchRecommendedShards'); /** * This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate From 5e2ee2398ea5f7b30d8c1783be5cde05803e54fd Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 26 Oct 2016 19:42:21 +0100 Subject: [PATCH 185/188] Fix some destroy stuff (#828) --- src/client/Client.js | 18 ++++++++---------- src/client/rest/RESTMethods.js | 2 +- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/client/Client.js b/src/client/Client.js index 58e7f595f..22163e77a 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -235,16 +235,14 @@ class Client extends EventEmitter { */ destroy() { return new Promise((resolve, reject) => { - this.manager.destroy().then(() => { - for (const t of this._timeouts) clearTimeout(t); - for (const i of this._intervals) clearInterval(i); - this._timeouts = []; - this._intervals = []; - this.token = null; - this.email = null; - this.password = null; - resolve(); - }).catch(reject); + for (const t of this._timeouts) clearTimeout(t); + for (const i of this._intervals) clearInterval(i); + this._timeouts = []; + this._intervals = []; + this.token = null; + this.email = null; + this.password = null; + this.manager.destroy().then(resolve).catch(reject); }); } diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 884076fb1..1555d4e95 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -36,7 +36,7 @@ class RESTMethods { } logout() { - return this.rest.makeRequest('post', Constants.Endpoints.logout, true); + return this.rest.makeRequest('post', Constants.Endpoints.logout, true, {}); } getGateway() { From 00fe45f6b35560ac736822eb0371b5362938198c Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 26 Oct 2016 19:52:41 +0100 Subject: [PATCH 186/188] simplify client destruction --- src/client/Client.js | 18 ++++++++---------- src/client/ClientManager.js | 2 +- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/client/Client.js b/src/client/Client.js index 22163e77a..39a222154 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -234,16 +234,14 @@ class Client extends EventEmitter { * @returns {Promise} */ destroy() { - return new Promise((resolve, reject) => { - for (const t of this._timeouts) clearTimeout(t); - for (const i of this._intervals) clearInterval(i); - this._timeouts = []; - this._intervals = []; - this.token = null; - this.email = null; - this.password = null; - this.manager.destroy().then(resolve).catch(reject); - }); + for (const t of this._timeouts) clearTimeout(t); + for (const i of this._intervals) clearInterval(i); + this._timeouts = []; + this._intervals = []; + this.token = null; + this.email = null; + this.password = null; + return this.manager.destroy(); } /** diff --git a/src/client/ClientManager.js b/src/client/ClientManager.js index 89acc523a..03d43b375 100644 --- a/src/client/ClientManager.js +++ b/src/client/ClientManager.js @@ -59,10 +59,10 @@ class ClientManager { destroy() { return new Promise((resolve) => { + this.client.ws.destroy(); if (!this.client.user.bot) { this.client.rest.methods.logout().then(resolve); } else { - this.client.ws.destroy(); resolve(); } }); From 1a3ea65abd7d47c335806602c6398534aae758e9 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 26 Oct 2016 20:15:56 +0100 Subject: [PATCH 187/188] fix some shard stuff on linux --- src/sharding/Shard.js | 7 +++---- test/random.js | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/sharding/Shard.js b/src/sharding/Shard.js index 364861b7f..c7ed240ce 100644 --- a/src/sharding/Shard.js +++ b/src/sharding/Shard.js @@ -29,10 +29,9 @@ class Shard { * The environment variables for the shard * @type {Object} */ - this.env = { - SHARD_ID: this.id, - SHARD_COUNT: this.manager.totalShards, - }; + this.env = Object.assign({}, process.env); + this.env.SHARD_ID = this.id; + this.env.SHARD_COUNT = this.manager.totalShards; if (this.manager.token) this.env.CLIENT_TOKEN = this.manager.token; /** diff --git a/test/random.js b/test/random.js index 0c9776ee4..efc8662f6 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({ fetchAllMembers: false, apiRequestMethod: 'burst' }); +const client = new Discord.Client({ fetchAllMembers: false, apiRequestMethod: 'sequential' }); const { email, password, token, usertoken, song } = require('./auth.json'); From ecee07655f53e221d6e86c835e33e22154bef982 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Wed, 26 Oct 2016 15:31:05 -0400 Subject: [PATCH 188/188] Simplify Shard.env --- src/sharding/Shard.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/sharding/Shard.js b/src/sharding/Shard.js index c7ed240ce..bafa0a383 100644 --- a/src/sharding/Shard.js +++ b/src/sharding/Shard.js @@ -29,10 +29,11 @@ class Shard { * The environment variables for the shard * @type {Object} */ - this.env = Object.assign({}, process.env); - this.env.SHARD_ID = this.id; - this.env.SHARD_COUNT = this.manager.totalShards; - if (this.manager.token) this.env.CLIENT_TOKEN = this.manager.token; + this.env = Object.assign({}, process.env, { + SHARD_ID: this.id, + SHARD_COUNT: this.manager.totalShards, + CLIENT_TOKEN: this.manager.token, + }); /** * Process of the shard